Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1213859 - Use dnf as default package manager
Summary: Use dnf as default package manager
Status: CLOSED DUPLICATE of bug 1211978
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 22
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: F22FinalBlocker
TreeView+ depends on / blocked
Reported: 2015-04-21 13:03 UTC by Lukas Slebodnik
Modified: 2015-04-21 15:57 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-04-21 15:57:01 UTC
Type: Bug

Attachments (Terms of Use)

Description Lukas Slebodnik 2015-04-21 13:03:16 UTC
Description of problem:
One of the recent changes in fedora 22 is replacing yum with dnf. It is caused by new package dnf-yum. So currently /usr/bin/yum will call /usr/bin/dnf and warning is printed.

 DEBUG  ['/usr/bin/yum', '--installroot', '/var/lib/mock/fedora-22-x86_64/root/', '--releasever', '22', 'install', '@buildsys-build']
DEBUG  child environment: None
DEBUG  Executing command: ['/usr/bin/yum', '--installroot', '/var/lib/mock/fedora-22-x86_64/root/', '--releasever', '22', 'install', '@buildsys-build', '--setopt=tsflags=noc
ontexts'] with env {'LANG': 'en_US.UTF-8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'LC_MESSAGES': 'C', 'HOSTNAME': 'mock', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'prin
tf "\x1b]0;<mock-chroot>\x07<mock-chroot>"', 'HOME': '/builddir', 'CCACHE_DIR': '/tmp/ccache', 'CCACHE_UMASK': '002'} and shell False
DEBUG  Yum command has been deprecated, use dnf instead.
DEBUG  See 'man dnf' and 'man yum2dnf' for more information.
DEBUG  To transfer transaction metadata from yum to DNF, run 'dnf migrate'Redirecting to '/usr/bin/dnf --installroot /var/lib/mock/fedora-22-x86_64/root/ --releasever 22 ins
tall @buildsys-build --setopt=tsflags=nocontexts'

mock assumes it will use tum as package manager but actually it will use dnf.
As a result of this I'm not bale to use mock on fedora 22.

[build@host mock]$ mock --root fedora-22-x86_64 --resultdir . --rebuild ./sssd-1.12.90-0.fc22.src.rpm 
INFO: version 1.2.7 starting (python version = 2.7.9)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
INFO: Start(./sssd-1.12.90-0.fc22.src.rpm)  Config(fedora-22-x86_64)
Start: clean chroot
Finish: clean chroot
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
INFO: enabled ccache
Mock Version: 1.2.7
INFO: Mock Version: 1.2.7
Start: yum install
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.
To transfer transaction metadata from yum to DNF, run 'dnf migrate'Redirecting to '/usr/bin/dnf --installroot /var/lib/mock/fedora-22-x86_64/root/ --releasever 22 install @buildsys-build --setopt=tsflags=nocontexts'

Version-Release number of selected component (if applicable):

ERROR: Exception(./sssd-1.12.90-0.fc22.src.rpm) Config(fedora-22-x86_64) 0 minutes 28 seconds
INFO: Results and/or logs in: .
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
Finish: clean chroot
ERROR: Command failed. See logs for output.
 # /usr/bin/yum --installroot /var/lib/mock/fedora-22-x86_64/root/ --releasever 22 install @buildsys-build --setopt=tsflags=nocontexts

mock can be used for building packages in rawhide because there is explicitly used dnf as package manager.
[build@host mock]$ grep package_manager /etc/mock/fedora-rawhide-x86_64.cfg 
config_opts['package_manager'] = 'dnf'

How reproducible:

Steps to Reproduce:
1. rebuild srpm in fedora-22-x86_64  chroot

Actual results:
it failed

Expected results:
packages are built from srpm. 

Additional info:
I tried to add option "config_opts['package_manager'] = 'dnf'" to fedora and epel-{6,7} mock configuration files and it works. This is the reason of bug summary.

The another alternative is to directly use /usr/bin/yum-deprecated. 
But yum-deprecated is not recognized as a valid package manager.

Comment 1 Fedora Blocker Bugs Application 2015-04-21 13:07:51 UTC
Proposed as a Blocker for 22-final by Fedora user lslebodn using the blocker tracking app because:

 Mock cannot be used for building packages. It only works with fedora rawhide chroot.

Comment 2 Miroslav Suchý 2015-04-21 15:57:01 UTC

*** This bug has been marked as a duplicate of bug 1211978 ***

Note You need to log in before you can comment on or make changes to this bug.