For some reason, we are getting an empty licensecheck.txt file on Copr builders, see https://github.com/fedora-copr/copr/issues/2980
licensecheck.txt
It works fine on my laptop with F39, and I also tried a docker container with F37 and it works there as well. I am trying to investigate what is going on and the deepest I could get was into the generic.py file, specifically:
generic.py
def _get_source_dir(): """Decide which directory to run licensecheck on. This can be..." ... globs = glob(s) if globs: msg = "Checking patched sources after %prep for licenses." source_dir = globs[0] ...
On my system the globs looks like this:
globs
['/var/lib/mock/fedora-39-x86_64/root/builddir/build/BUILD/undici-5.27.2', '/var/lib/mock/fedora-39-x86_64/root/builddir/build/BUILD/undici-5.27.2-SPECPARTS']
The first directory contains the sources and the second directory is empty. However, on Copr builders, the directories are reversed
['/var/lib/mock/fedora-39-x86_64/root/builddir/build/BUILD/undici-5.27.2-SPECPARTS', '/var/lib/mock/fedora-39-x86_64/root/builddir/build/BUILD/undici-5.27.2']
and therefore the source_dir is an empty directory. Do you know what is going on? Is this even a fedora-reivew issue?
source_dir
fedora-reivew
Please let me know what you think.
I don't think the order of items returned by glob is stable. I'd filter out SPECPARTS dir and use the other result instead
Agreed, thank you @decathorpe. Modified in PR #507
The PR was merged, I think we can close.
Metadata Update from @frostyx: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)