Description of problem: mock ignores the --dnf command line option and config_opts['package_manager'] = 'dnf' in the mock configuration files. This is problematic because the result is an unrealistic Fedora chroot which does not match what the Fedora builders use. Version-Release number of selected component (if applicable): mock-1.2.21-1.el7.noarch How reproducible: Always. Steps to Reproduce: 1. mock --dnf -r fedora-25-x86_64 --init Actual results: chroot is built using yum. Expected results: chroot is built using dnf.
Are you sure you have DNF installed on your EL7?
(In reply to Miroslav Suchý from comment #1) > Are you sure you have DNF installed on your EL7? Yes, dnf-0.6.4-2.el7.noarch is installed (the latest from EPEL).
Looking into code we have there: if pm == 'yum': return Yum(config_opts, chroot, plugins) elif pm == 'dnf': (distribution, version) = distro.linux_distribution(full_distribution_name=False)[0:2] if distribution in ['redhat', 'centos']: version = int(version.split('.')[0]) if version < 8: if 'dnf_warning' in config_opts and config_opts['dnf_warning']: print("""WARNING! WARNING! WARNING! You are building package for distribution which use DNF. However your system does not support DNF. You can continue with YUM, which will likely succeed, but the result may be little different. You can suppress this warning when you put config_opts['dnf_warning'] = False in Mock config.""") input("Press Enter to continue.") return Yum(config_opts, chroot, plugins) return Dnf(config_opts, chroot, plugins) So this was intentional. As in time of writing this code there were no DNF available for EL. I suppose that we can add check for existence of /usr/bin/dnf now. BTW: you should get the warning above. Unless you *manually* insert config_opts['dnf_warning'] = False in your config.
(In reply to Miroslav Suchý from comment #3) > So this was intentional. As in time of writing this code there were no DNF > available for EL. I suppose that we can add check for existence of > /usr/bin/dnf now. Ugh. Certainly it would have been better to strip these settings from the configuration files and manual page on EPEL because everything gives the impression this is supported. The question is what constructs more broken buildroots, the outdated DNF version in EPEL, or yum. > BTW: you should get the warning above. Unless you *manually* insert > config_opts['dnf_warning'] = False > in your config. No, the warning is disabled by default because the configuration key is not set.
Fixed in commit 4c3a51fba9c48aec7b148e81ca2b50f5280b0b8f
mock-1.3.3-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1c15f1fddc
mock-1.3.3-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5947ef9fd1
mock-1.3.3-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-77cb570c74
mock-1.3.3-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-3b5bb282f4
mock-1.3.3-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1c15f1fddc
mock-1.3.3-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-3b5bb282f4
mock-1.3.3-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-77cb570c74
mock-1.3.3-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-5947ef9fd1
mock-1.3.3-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.3.3-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.3.3-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.3.3-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.