Open mikem23 opened 9 months ago
Thank you for the report!
Override of cleanup_on_success setting triggers mock to run rpmbuild with --noclean, which can break builds in certain situations.
This is interesting. Isn't such a build failure a bug in the package?
It certainly makes sense to avoid deleting the results, but passing --noclean to rpmbuild is really a separate question and certainly isn't required to avoid deleting the mock resultdir.
Mock uses rpmbuild --noclean
to keep %builddir (not resultdir). The definition (e.g. in manpage):
-n, --no-clean
Do not clean chroot before building a package.
Somewhat related is #999.
This is interesting. Isn't such a build failure a bug in the package?
Arguably yes. That said, it's a documented part of the rpmbuild process and ultimately a separate question from the mock-level full chroot clean.
Short description of the problem
Override of
cleanup_on_success
setting triggers mock to run rpmbuild with--noclean
, which can break builds in certain situations.cleanup_on_success defaults to True, but is forced to False when
is_in_dir(config_resultdir, basechrootdir)
. This check seems to be True in default invocations. The basechrootdir value here is{basedir}/{root}
, not the actual chroot directory ({basedir}/{root}/root
).It certainly makes sense to avoid deleting the results, but passing
--noclean
to rpmbuild is really a separate question and certainly isn't required to avoid deleting the mock resultdir.I would suggest:
Output of
rpm -q mock
mock-5.2-1.el8eng.noarch
Steps to reproduce issue
--noclean
is being passedDo not forget to mention full commandline with the mock command you executed.
mock -r mikem-RHELBLD-14264 --old-chroot --no-clean --target x86_64 --rebuild /tmp/fake-1.1-33.src.rpm
Any additional notes
Related -- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2105393