Mock, Rawhide and DNF

Pierre-Yves Chibon pingou at pingoured.fr
Fri Feb 13 09:11:58 UTC 2015


On Fri, Feb 13, 2015 at 09:35:30AM +0100, Miroslav Suchy wrote:
> Hi,
> I just released mock-1.2.7. It have - beside one small bug and new F22
> configs - one important change.
> 
> The rawhide configs have this one line included:
>   config_opts['package_manager'] = 'dnf'
> which means that Mock will use DNF for building packages for rawhide
> targets. There are two consequences, which I would like to point out.
> 
> This change is done only in Mock, but not in Koji. M.McLean is working on
> Koji code enhancement, which allow to do this change in Koji too. The ETA is
> 1-3 months. During this transient period Koji will use YUM for rawhide
> targets, while your local mock builds will use DNF. We would like to use
> this period to get broader testing of Mock+DNF before it reach Koji. If you
> experience some problem (I believe there will be none) please report it, so
> we can address it before we deploy this change on Koji.
> 
> RHEL/EPEL users do not have DNF available, therefore they are unable to
> build packages for Fedora Rawhide. There is however a workaround. Just
> change this line:
>   config_opts['package_manager'] = 'dnf'
> to this:
>   config_opts['package_manager'] = 'yum'
> or you can simply delete it because Yum is the default.
> Or you can pass "--yum" to mock.

Could it be an idea to check if /usr/bin/dnf exists (or if dnf can be found in
$PATH) before calling dnf and if not a) warn the user and b) switch back to yum?

This would make mock run out of the box for RHEL/EPEL users as well.

Pierre


More information about the devel mailing list