dnf replacing yum and dnf-yum

Michael Šimáček msimacek at redhat.com
Fri Apr 3 20:42:22 UTC 2015



On 2015-04-03 21:18, Adam Williamson wrote:
> On Fri, 2015-04-03 at 12:18 -0300, Paulo César Pereira de Andrade wrote:
>> 2015-04-03 12:04 GMT-03:00 Paulo César Pereira de Andrade
>> <paulo.cesar.pereira.de.andrade at gmail.com>:
>>> 2015-04-03 11:24 GMT-03:00 Miroslav Suchý <msuchy at redhat.com>:
>>>> On 04/03/2015 03:41 PM, Paulo César Pereira de Andrade wrote:
>>>>> DEBUG util.py:388:  No such command: builddep. Please use
>>>>> /usr/bin/dnf --help
>>>>> DEBUG util.py:388:  It could be a DNF plugin command.
>>>>>
>>>>> I will review using a release other than rawhide.
>>>>
>>>> Just install dnf-plugins-core.
>>>
>>>    It should have been installed in an update, e.g. as a dependency
>>> of any packagers tool.
>>>
>>>    It is also not available in any repo, for rhel7 (I would expect
>>> it
>>> in epel). I run mock frequently in rhel7, but usually just as a
>>> simple
>>> way to create a rawhide, f22 or f21 chroot.
>>
>> Nevermind, I thought dnf-plugins-core would be something that would
>> fix mock chroot generation with fedora-review, it is just
>> documentation,
>> not related to mock.
>
> mock should be adapted to dnf or changed to call yum-deprecated on F22
> and F23.

Mock is adapted to dnf, you just have to tell it to use it in the config 
and it is the default on rawhide.

>
> the 'resolvedep' command was already marked as deprecated *in yum*:
>
>          * resolvedep dep1 [dep2] [...]
>             (maintained  for  legacy  reasons  only - use repoquery or
> yum pro‐
>         vides)
>
> so mock really should've been ported off it a while back. If there
> isn't a bug on mock for this already, we should file

This is only called when mock is using yum and yum still maintains the 
command. When mock uses dnf it's not necessary to call it in the first 
place, as it was there only to avoid yum skipping missing dependencies, 
which dnf builddep doesn't do. If you configure mock to use dnf, it will 
work. What doesn't work is when you have it configured to use yum and 
yum is a wrapper around dnf, because dnf-yum doesn't provide 
yum-builddep (it fails earlier due to resolvedep, but that's not the 
real problem, we can get rid of resolvedep, but we need builddep). As 
the two package managers don't provide the same command (builddep) under 
the same name (yum-builddep vs dnf builddep), mock needs to know which 
one it's dealing with, you need to tell it in the config that it's dnf.
The reason why mock exists is to provide reproducible builds. If the 
used package manager is dependent on the distro version, it goes agains 
the principle. So I think it would be better keep this explicit 
configuration instead of using /usr/bin/yum that may point anywhere. 
Setting the non-rawhide (target we build for) config default to 
yum-deprecated for >f22 (distro mock is running on) looks like a 
reasonable solution to me, provided that yum-deprecated works with 
yum-builddep.

Michael Simacek


More information about the devel mailing list