Description of problem: When dnf.conf is set to cacheonly=1 to prevent automatically updating the cache, the dedicated makecache subcommand stops working, preventing *any* way to update the metadata without removing the setting. Version-Release number of selected component (if applicable): 4.6.0-2.mga9 (same as 4.6.0-1.fc35) How reproducible: Always Steps to Reproduce: 1. Edit /etc/dnf/dnf.conf to set cacheonly=True 2. Run "dnf makecache" Actual results: Does nothing and prints "Metadata cache created." Expected results: Overrides cacheonly setting and fetches metadata to cache. Additional info: Mageia would like DNF to only update metadata caches when "dnf makecache" is run rather than when the metadata expires, but this functionality does not work as expected.
A few tests make me think that this whole path is broken: [ngompa@mgacauldron-dev ~]$ sudo dnf clean expire-cache Cache was expired 0 files removed [ngompa@mgacauldron-dev ~]$ sudo dnf makecache Metadata cache created. [ngompa@mgacauldron-dev ~]$ sudo dnf clean all 206 files removed [ngompa@mgacauldron-dev ~]$ sudo dnf makecache Error: Cache-only enabled but no cache for 'cauldron-x86_64'
`dnf makecache` should definitely ignore the cacheonly option.
I don't know if the code invoked is the same, though the output side effect look similar also if we force the cache to expire and then we update, hope this is the same case when the cache expires too: - without cacheonly=True # dnf clean expire-cache La cache è scaduta 0 file rimossi # dnf update Mageia 8 - x86_64 7.4 kB/s | 4.3 kB 00:00 Mageia 8 - x86_64 - Updates 6.4 kB/s | 3.3 kB 00:00 Dipendenze risolte. Nessuna operazione da compiere. Fatto! - with cacheonly=True # dnf clean expire-cache La cache è scaduta 0 file rimossi # dnf update Ultima verifica della scadenza dei metadati: 0:00:32 fa il lun 29 mar 2021, 20:26:34. Dipendenze risolte. Nessuna operazione da compiere. Fatto!
hmm well dnf clean expire-cache seems not to work either with cacheonly=True as you can see "Ultima verifica della scadenza dei metadati: 0:00:32 fa il lun 29 mar 2021, 20:26:34." means that metadata is still timestamped to the before update. So the above experiment should be performed adding cacheonly=True just after dnf clean expire-cache. Then the output is: # dnf update Dipendenze risolte. Nessuna operazione da compiere. Fatto! then if i remove cacheonly=True now: # dnf update Mageia 8 - x86_64 6.4 kB/s | 4.3 kB 00:00 Mageia 8 - x86_64 - Updates 6.0 kB/s | 3.3 kB 00:00 Dipendenze risolte. Nessuna operazione da compiere. Fatto!
This bug appears to have been reported against 'rawhide' during the Fedora 35 development cycle. Changing version to 35.
This message is a reminder that Fedora Linux 35 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13. 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 'version' of '35'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 35 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 Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 38 development cycle. Changing version to 38.
This message is a reminder that Fedora Linux 38 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 38 on 2024-05-21. 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 'version' of '38'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 38 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 Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.