The yum_cache plugin for Mock hardcodes /var/cache/yum as the only directory to handle. It would be nice if it could perform the same process for /var/cache/dnf.
/var/cache/dnf should also probably be added to the default set of excluded directories for the root cache.
You can tell dnf to use /var/cache/yum - that's what is in the default configs. But I agree that it would be better to have nicer solution.
Created attachment 971992 [details] dnf_cache.py
I started from the yum_cache plugin and made some adaptations for DNF. Some very basic testing makes me think it works, but I'm not an expert on mock at all so please tell me if you see anything wrong with it.
Fixed by: * faf6f0f Binding DNF cache directory with yum_cache [RHBZ#1176560] by msimacek. The approach was little bit different. yum_cache plugin handle now even DNF (so no duplicated code). The visible change is that in config is now: ...['yum_cache_opts']['dir'] = "%(cache_topdir)s/%(root)s/%(package_manager)s_cache/" and there is new option: .... ['yum_cache_opts']['target_dir']: "/var/cache/%(package_manager)s/"
mock-1.2.8-1.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/mock-1.2.8-1.fc22
mock-1.2.8-1.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/mock-1.2.8-1.fc21
mock-1.2.8-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/mock-1.2.8-1.fc20
mock-1.2.8-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.8-1.el7
mock-1.2.8-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.8-1.el6
Package mock-1.2.8-1.el7: * should fix your issue, * was pushed to the Fedora EPEL 7 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=epel-testing mock-1.2.8-1.el7' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-6057/mock-1.2.8-1.el7 then log in and leave karma (feedback).
mock-1.2.8-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.8-1.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.8-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.2.10-1.el7 has been submitted as an update for Fedora EPEL 7. https://admin.fedoraproject.org/updates/mock-1.2.10-1.el7
mock-1.2.10-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/mock-1.2.10-1.el6
mock-1.2.10-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.
mock-1.2.10-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.