+++ This bug was initially created as a clone of Bug #1230508 +++ Despite metadata_expire=0 DNF still download metadata even when they are fresh. Steps to reproduce: 1. Make sure that: /etc/mock/fedora-rawhide-x86_64.cfg contains config_opts['yum.conf'] = """ .... [main] metadata_expire=0 ... 2. Make sure that ~/.mock/user.cfg contains: config_opts['plugin_conf']['root_cache_enable'] = True 3. mock -r fedora-rawhide-x86_64 --scrub=all 4. mock -r fedora-rawhide-x86_64 --init 5. mock -r fedora-rawhide-x86_64 some.src.rpm Notice that in step 5 DNF is again downloading metadata in spite of being few minutes old. Note that per discussion with J. Silhan the metadata_expire=0 should be "sent HTTP HEAD with if-modified-since and download the file only if it is newer", but this is nowhere documented (at least not in man dnf.conf)
*** Bug 1285316 has been marked as a duplicate of this bug. ***
Seems like duplicate of bug 1226724. We'll fix this. *** This bug has been marked as a duplicate of bug 1226724 ***
Re-opening this. This seems to be cause by this [1] PR. I.e. there both sides to blame: 1) DNF is changing behavior and breaking backward compatibility, since it is now checking timestamp of the config file to expire the cache. And although the "metadata_expire=-1" is set and hence it should not care about any timestamps at all, it still fiddles around with them. Actually the default value in Mock is "metadata_expire=0" which is not documented and I am not really sure it works as it used to work for YUM ... 2) Mock in theory could set the "check_config_file_age=0" in the config file, but why it fiddles with the config file all the time, although the configuration is not changing, that is mystery to me ... [1]: https://github.com/rpm-software-management/dnf/pull/611
Fixed by https://github.com/rpm-software-management/dnf/pull/806
*** Bug 1410388 has been marked as a duplicate of this bug. ***
It looks like that the problem is that mock copy conf files without time stamps, therefore dnf thinks that conf was changed and try to re-download metadata. I believe that copying confs with timestamps should solve the issue.
Fixed by * 4a3db64 when creating yum/dnf.conf copy timestamp from host [RHBZ#1293910]
mock-1.4.8-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-e954edb1bb
mock-1.4.8-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-ac67357aa1
mock-1.4.8-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-0c8682fd2a
mock-1.4.8-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-e954edb1bb
mock-1.4.8-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-ac67357aa1
mock-1.4.8-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-0c8682fd2a
This does not work: ~~~ $ rpm -q mock mock-1.4.8-1.fc28.noarch $ rpm -q dnf dnf-2.7.5-4.fc28.noarch $ ls -la /var/lib/mock/fedora-rawhide-x86_64/root/etc/dnf/dnf.conf -rw-rw-r--. 1 root root 626 Jan 2 16.04 /var/lib/mock/fedora-rawhide-x86_64/root/etc/dnf/dnf.conf $ mock -r fedora-rawhide-x86_64 -i rubygems ruby-irb rubygem-rake ruby-devel rubygem-rdoc rubygem-test-unit rubygem-minitest rubygem-net-telnet rubygem-did_you_mean ruby-doc rubygem-bigdecimal rubygem-json rubygems-devel rubygem-xmlrpc INFO: mock.py version 1.4.8 starting (python version = 3.6.3)... Start: init plugins INFO: selinux disabled Finish: init plugins Start: run Start: chroot init INFO: LVM plugin enabled. Allocated pool data: 26.15%. Allocated metadata: 14.98%. WARNING: For multilib systems, both architectures of nosync library need to be installed INFO: calling preinit hooks INFO: enabled dnf cache Start: cleaning dnf metadata Finish: cleaning dnf metadata INFO: enabled HW Info plugin Mock Version: 1.4.8 INFO: Mock Version: 1.4.8 Finish: chroot init INFO: installing package(s): rubygems ruby-irb rubygem-rake ruby-devel rubygem-rdoc rubygem-test-unit rubygem-minitest rubygem-net-telnet rubygem-did_you_mean ruby-doc rubygem-bigdecimal rubygem-json rubygems-devel rubygem-xmlrpc local 3.3 MB/s | 54 MB 00:16 Last metadata expiration check: 0:00:00 ago on Út 2. leden 2018, 16:11:10 CET. Package rubygems-2.6.13-100.fc28.noarch is already installed, skipping. Package ruby-irb-2.4.2-85.fc28.noarch is already installed, skipping. Package rubygem-rake-12.3.0-100.fc28.noarch is already installed, skipping. Package ruby-devel-2.4.2-85.fc28.x86_64 is already installed, skipping. Package rubygem-rdoc-5.1.0-2.fc27.noarch is already installed, skipping. Package rubygem-test-unit-3.2.7-100.fc28.noarch is already installed, skipping. Package rubygem-minitest-5.10.3-100.fc27.noarch is already installed, skipping. Package rubygem-net-telnet-0.1.1-85.fc28.x86_64 is already installed, skipping. Package rubygem-did_you_mean-1.1.0-85.fc28.x86_64 is already installed, skipping. Package ruby-doc-2.4.2-85.fc28.noarch is already installed, skipping. Package rubygem-bigdecimal-1.3.0-85.fc28.x86_64 is already installed, skipping. Package rubygem-json-2.1.0-102.fc27.x86_64 is already installed, skipping. Package rubygems-devel-2.6.13-100.fc28.noarch is already installed, skipping. Package rubygem-xmlrpc-0.2.1-85.fc28.noarch is already installed, skipping. Dependencies resolved. Nothing to do. Complete! INFO: Finish: run $ ls -la /var/lib/mock/fedora-rawhide-x86_64/root/etc/dnf/dnf.conf -rw-rw-r--. 1 root root 626 Jan 2 16.10 /var/lib/mock/fedora-rawhide-x86_64/root/etc/dnf/dnf.conf ~~~ But it seems that the yum.conf (which is empty) timestamp has not changed since creation of the build root ~~~ $ ls -la /var/lib/mock/fedora-rawhide-x86_64/root/etc/yum.conf lrwxrwxrwx. 1 root root 12 Jan 2 15:12 /var/lib/mock/fedora-rawhide-x86_64/root/etc/yum.conf -> yum/yum.conf ~~~
mock-1.4.8-1.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.4.8-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.
mock-1.4.8-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.
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle. Changing version to '28'.
This message is a reminder that Fedora 28 is nearing its end of life. On 2019-May-28 Fedora will stop maintaining and issuing updates for Fedora 28. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '28'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 28 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.