Bug 1272636

Summary: dnf sometimes shows wrong time when last metadata expiration check was done
Product: [Fedora] Fedora Reporter: maarten <madebr>
Component: dnfAssignee: rpm-software-management
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: jsilhan, madebr, mluscon, packaging-team-maint, pnemade, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 18:14:56 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 maarten 2015-10-17 04:14:05 UTC
Description of problem:
Sometimes, when I want to search for a package using 'dnf search',
the date when the metadate expiration check was performed last is plain wrong.

Version-Release number of selected component (if applicable):
$ dnf --version
1.1.2
  Installed: dnf-0:1.1.2-4.fc22.noarch at 2015-10-07 10:01
  Built    : Fedora Project at 2015-09-30 13:57

  Installed: rpm-0:4.12.0.1-12.fc22.x86_64 at 2015-07-05 00:52
  Built    : Fedora Project at 2015-06-29 10:36

How reproducible:
It does not happen every time.
But when it does, subsequent calls to dnf will show the wrong metadata expiration check date.

Steps to Reproduce:
1. (I don't know how to trigger the problem)
2. Do a dnf query, e.g. dnf search czmq

Actual results:
Last metadata expiration check performed 24 days, 15:35:22 ago on Tue Sep 22 14:35:04 2015.
...

Expected results:
A time not so long in the past.

Additional info:
'dnf clean metadata' will set the metadata expiration check date back to a correct value.

Comment 1 Honza Silhan 2015-10-21 14:05:56 UTC
what value do you have for `metadata_expire` in your /etc/dnf/dnf.conf file?

Comment 2 maarten 2015-10-23 16:54:04 UTC
That value is not present.
$ cat /etc/dnf/dnf.conf 
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=true

Comment 3 maarten 2015-10-25 01:28:24 UTC
I think I know what is going on.
Running dnf as user or root gives another result.
I don't know whether that is the intent?

[maarten@localhost ~]$ sudo dnf search czmq
Last metadata expiration check performed 1:04:26 ago on Sun Oct 25 02:22:08 2015.

...

[maarten@localhost ~]$ dnf search czmq
Last metadata expiration check performed 7 days, 21:13:19 ago on Sat Oct 17 06:13:18 2015.

...

Comment 4 Fedora Admin XMLRPC Client 2016-07-08 09:29:13 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Fedora End Of Life 2016-07-19 18:14:56 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 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.