Bug 1151854

Summary: --cacheonly is not being respected – will update the cache if expired
Product: [Fedora] Fedora Reporter: Christian Stadelmann <fedora>
Component: dnfAssignee: Michal Luscon <mluscon>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: akozumpl, jsilhan, mluscon, packaging-team-maint, pnemade, rholy, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-0.6.3-2.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-13 09:53:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christian Stadelmann 2014-10-12 16:17:08 UTC
Description of problem:
I run `$ dnf --cacheonly upgrade` quite frequently. Every time the cache expires it updates the cache from network. This is not what the man page says:

-C, --cacheonly
Run  entirely  from  system cache, don't update the cache and use it even in case it is expired.
DNF uses a separate cache for each user under which it executes. The cache  for  the  root  user  is called the system cache. This switch allows a regular user read-only access to  the  system  cache  which usually  is  more fresh then the user's and thus he does not have to wait for metadata sync.


Version-Release number of selected component (if applicable):
dnf 0.6.2-1.fc21 from F21 Alpha

How reproducible:
always

Additional Info:
There was a similar bug: https://bugzilla.redhat.com/show_bug.cgi?id=1048468 so this seems to be a regression.

Comment 1 Michal Luscon 2014-10-20 12:06:00 UTC
Unfortunately, I am not able to reproduce this bug in dnf 0.6.2-1. Is there any difference between your system and fresh F21 alpha installation?

Comment 2 Christian Stadelmann 2014-10-26 10:45:38 UTC
Yes. I have set root's umask to 077 and have installed all available updates.

Comment 3 Fedora Update System 2014-12-09 14:06:44 UTC
dnf-0.6.3-2.fc21,dnf-plugins-core-0.1.4-1.fc21,hawkey-0.5.2-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dnf-0.6.3-2.fc21,dnf-plugins-core-0.1.4-1.fc21,hawkey-0.5.2-1.fc21

Comment 4 Fedora Update System 2014-12-12 04:32:50 UTC
Package dnf-0.6.3-2.fc21, hawkey-0.5.2-1.fc21, dnf-plugins-core-0.1.4-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.6.3-2.fc21 hawkey-0.5.2-1.fc21 dnf-plugins-core-0.1.4-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-16760/dnf-0.6.3-2.fc21,dnf-plugins-core-0.1.4-1.fc21,hawkey-0.5.2-1.fc21
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-12-13 09:53:51 UTC
dnf-0.6.3-2.fc21, hawkey-0.5.2-1.fc21, dnf-plugins-core-0.1.4-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.