Description of problem: I have submitted a package review (https://bugzilla.redhat.com/show_bug.cgi?id=1822847) and facing a weird error from fedora-review. They reported the installation errors like this: INFO: installing package(s): /builddir/vl-pgothic-fonts-20220612-2.fc38.noarch.r pm /builddir/vl-gothic-fonts-all-20220612-2.fc38.noarch.rpm ERROR: Command failed: # /usr/bin/dnf --installroot /var/lib/mock/fedora-rawhide-x86_64/root/ --releas ever 38 --setopt=deltarpm=False --allowerasing --disableplugin=local --disablepl ugin=spacewalk --disableplugin=versionlock install /builddir/vl-pgothic-fonts-20 220612-2.fc38.noarch.rpm /builddir/vl-gothic-fonts-all-20220612-2.fc38.noarch.rp m Sure. following that step indeed introduces an error. but they are missing one package generated by rpm apparently. see: $ ls -1 1822847-vl-gothic-fonts/results/ build.log hw_info.log installed_pkgs.log root.log state.log vl-gothic-fonts-20220612-2.fc38.noarch.rpm vl-gothic-fonts-20220612-2.fc38.src.rpm vl-gothic-fonts-all-20220612-2.fc38.noarch.rpm vl-pgothic-fonts-20220612-2.fc38.noarch.rpm vl-gothic-fonts-all is a meta package which has dependencies to vl-gothic-fonts and vl-pgothic-fonts here. so that error happens. That looks like a bug in fedora-review. Version-Release number of selected component (if applicable): fedora-review-0.9.0-1.fc38.noarch How reproducible: always Steps to Reproduce: 1.fedora-review -b 1822847
Tested this using mock. On its own, the following fails: mock -r fedora-rawhide-x86_64 rebuild vl-gothic-fonts-20220612-2.fc38.src.rpm mock -r fedora-rawhide-x86_64 install /var/lib/mock/fedora-rawhide-x86_64/result/vl-gothic-fonts-all-20220612-2.fc38.noarch.rpm however installing the separate font packages first works: mock -r fedora-rawhide-x86_64 rebuild vl-gothic-fonts-20220612-2.fc38.src.rpm mock -r fedora-rawhide-x86_64 install /var/lib/mock/fedora-rawhide-x86_64/result/vl-gothic-fonts-20220612-2.fc38.noarch.rpm mock -r fedora-rawhide-x86_64 install /var/lib/mock/fedora-rawhide-x86_64/result/vl-pgothic-fonts-20220612-2.fc38.noarch.rpm mock -r fedora-rawhide-x86_64 install /var/lib/mock/fedora-rawhide-x86_64/result/vl-gothic-fonts-all-20220612-2.fc38.noarch.rpm This seems to affect other metapackages as well. For some reason, the dependencies in the metapackage are not installed first.
Updated component to mock, tested with mock 3.1, rpm 4.17.1 and dnf 4.14.0. The fonts install from https://copr.fedorainfracloud.org/coprs/fed500/vl-gothic-fonts/ mock needs a way to install metapackages when dependencies are local.
The following also works: mock -r fedora-rawhide-x86_64 --postinstall rebuild vl-gothic-fonts-20220612-2.fc38.src.rpm Possibly https://pagure.io/FedoraReview/blob/master/f/src/FedoraReview/mock.py could be modified to rebuild and install if installation on its own fails? Mock does not seem to have tests with metapackages: https://github.com/rpm-software-management/mock/tree/main/mock/integration-tests
Thank you for the report @Akira and @Benson! (In reply to Benson Muite from comment #1) > Tested this using mock. On its own, the following fails: > > mock -r fedora-rawhide-x86_64 rebuild vl-gothic-fonts-20220612-2.fc38.src.rpm > mock -r fedora-rawhide-x86_64 install /var/lib/mock/fedora-rawhide-x86_64/result/vl-gothic-fonts-all-20220612-2.fc38.noarch.rpm This can not work. This is an explicit request for package installation, using a path to filename, not a repository. Mock is not informed about the other dependency packages. > however installing the separate font packages first works: > mock -r fedora-rawhide-x86_64 rebuild vl-gothic-fonts-20220612-2.fc38.src.rpm > mock -r fedora-rawhide-x86_64 install /var/lib/mock/fedora-rawhide-x86_64/result/vl-gothic-fonts-20220612-2.fc38.noarch.rpm > mock -r fedora-rawhide-x86_64 install /var/lib/mock/fedora-rawhide-x86_64/result/vl-pgothic-fonts-20220612-2.fc38.noarch.rpm > mock -r fedora-rawhide-x86_64 install /var/lib/mock/fedora-rawhide-x86_64/result/vl-gothic-fonts-all-20220612-2.fc38.noarch.rpm And naturally, this works. The two first commands modify the chroot, and then the `*-all` package can be installed. > This seems to affect other metapackages as well. For some reason, the > dependencies in the metapackage are not installed first. It is not just about metapackages; any missing dependency will cause problems. There are at least two ways out: 1. install all the packages at once: $ mock -r fedora-rawhide-x86_64 install dep1.rpm dep2.rpm ... metapackage.rpm 2. provide an additional repository with all the dependencies: $ mkdir /tmp/repo $ cp /var/lib/mock/fedora-rawhide-x86_64/result/*.rpm /tmp/repo $ createrepo_c /tmp/repo $ mock -r fedora-rawhide-x86_64 --install v1-gothic-fonts-all --addrepo /tmp/repo Note that in the 2nd case I'm intentionally copying the *rpm files out from the chroot result directory. It seems less error-prone (better than mixing mock's inputs and outputs in one command). I'm closing this bug, but feel free to continue discussing here.
@praiskup Thanks for the suggestions. Will test what can be implemented in fedora-review, the second option seems easier to implement.
Seems like the needinfo flag was raised mistakenly (no question asked), let's clear it up.
Changing the status sine it appears fixes can be made in fedora-review
The problem is that the dependencies are taken from the packages explicitly listed in the spec file: https://pagure.io/FedoraReview/blob/master/f/src/FedoraReview/mock.py#_334 More packages than these can be generated when there are metapackages. Pull request with a possible fix: https://pagure.io/FedoraReview/pull-request/460
Using rpmspec https://rpm-software-management.github.io/rpm/man/rpmspec.8.html could be an alternative method or additional check.
FEDORA-2023-6e77bcd1e7 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-6e77bcd1e7
FEDORA-2023-a62b830c9a has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-a62b830c9a
FEDORA-2023-a62b830c9a has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-a62b830c9a` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-a62b830c9a See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-6e77bcd1e7 has been pushed to the Fedora 38 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-6e77bcd1e7` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-6e77bcd1e7 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-6e77bcd1e7 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-a62b830c9a has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.