fedora-copr / copr

RPM build system - upstream for https://copr.fedorainfracloud.org/
113 stars 61 forks source link

Fedora review have issues in rawhide chroots #3147

Closed xsuchy closed 8 months ago

xsuchy commented 9 months ago

Fedora review have issues in rawhide chroots. This seems to be due dnf3 vs. dnf5

Example: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2264719-blesh/fedora-rawhide-x86_64/07030872-blesh/fedora-review/fedora-review.log.gz

This may need a fix on fedora-review side. Filing it here so I do not forget till Monday.

FrostyX commented 9 months ago

This will probably be annoying for many people because this likely causes Fedora Review Service to fail for every ticket

FrostyX commented 9 months ago

Another example: https://copr.fedorainfracloud.org/coprs/g/fedora-review/fedora-review-2262694-materialx/build/7013260/

FrostyX commented 9 months ago

I think I understand what is going on but I didn't have time to fix this yet.

In the logs, we can se

INFO: Package manager dnf5 detected and used (direct choice)

and

INFO: Package manager dnf5 detected and used (fallback)

And no errors, so DNF5 is there and it works fine.

The failure comes from this command

'['mock', '-r', '/var/lib/copr-rpmbuild/results/configs/child.cfg', '--no-cleanup-after', '--no-clean', '-qn', '--enable-network', 'shell', '--', 'dnf-3 repoquery -C -l filesystem']'

and IMHO not because dnf-3 command wouldn'tbe available but because of the -C (cache only) parameter

When reproducing this manually, I get

[root@builder /]# mock -r fedora-rawhide-x86_64 --no-cleanup-after --no-clean -qn --enable-network shell -- dnf-3 repoquery -C -l filesystem Error: Cache-only enabled but no cache for 'fedora'

Well duh, dnf-3 has no cache, probably only dnf-5 has. Without the -C parameters it is slower but it works fine.

I think the solution might be checking if the cache exists and only in such case adding -C.

FrostyX commented 9 months ago

Fedora-review upstream issue: https://pagure.io/FedoraReview/issue/511

FrostyX commented 8 months ago

PR: https://pagure.io/FedoraReview/pull-request/513