DNF and mock

Michael Šimáček msimacek at redhat.com
Mon Mar 16 11:32:41 UTC 2015

On 2015-03-16 06:43, Mikolaj Izdebski wrote:
> On 03/15/2015 02:38 PM, Michael Schwendt wrote:
>> On Thu, 22 Jan 2015 15:15:48 +0100, Miroslav Suchý wrote:
>>> I just spoke with two members of DNF team about default usage of DNF in mock. I would like to share outcomes of this
>>> meeting.
>>> First I would like to state that you can already optionally use DNF in your mock by setting:
>>>    config_opts['package_manager'] = 'dnf'
>> I've switched back to Yum for now.
>>> I expect that we will be building Fedora 22- always by yum due to short Fedora life cycle. Yum will be still present in
>>> Fedora 24 for sure.
>> Is DNF within Mock a fully compatible replacement for Yum yet?
>> It seems builds take much longer now since something's downloading
>> (or redownloading?) lots of data for each build job before setting
>> up the buildroot. I don't have much time to look into it, bug shouldn't
>> Mock's buildroot cache files be fresh enough to avoid redownloading
>> packages, for example?
> Redownloading packages is DNF default setting [1], which you can adjust
> in mock config. I personally use caching proxy to avoid this problem and
> share packages between multiple chroots.

Configurations shipped with current mock have keepcache=1 by default, so 
the redownloading shouldn't happen if you have yum_cache enabled. But if 
you use different configs than the default ones, you'll need to adjust 
the config manually.

Technically, yum_cache wans't "ported" to dnf, but due to the similarity 
of the two package managers, if the cachedir is set to /var/cache/yum 
(which it is in the shipped configs), it should work without changes.

Michael Simacek

> [1] http://dnf.readthedocs.org/en/latest/conf_ref.html#keepcache-label

More information about the devel mailing list