Bug 908491 - [rfe] list recent
[rfe] list recent
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Panu Matilainen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-02-06 15:36 EST by "FeRD" (Frank Dana)
Modified: 2013-06-30 21:37 EDT (History)
2 users (show)

See Also:
Fixed In Version: libsolv-0.3.0-5.git228d412.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-06-30 21:37:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
File: backtrace (1.47 KB, text/plain)
2013-02-06 15:36 EST, "FeRD" (Frank Dana)
no flags Details
File: core_backtrace (726 bytes, text/plain)
2013-02-06 15:36 EST, "FeRD" (Frank Dana)
no flags Details
File: environ (1.64 KB, text/plain)
2013-02-06 15:36 EST, "FeRD" (Frank Dana)
no flags Details
Resurrect "list recent" functionality (1.38 KB, patch)
2013-05-30 06:26 EDT, Panu Matilainen
no flags Details | Diff

  None (edit)
Description "FeRD" (Frank Dana) 2013-02-06 15:36:08 EST
Description of problem:
Occurred when I ran the following:
% sudo dnf -v list recent

...After a bunch of other (successful) dnf commands, including '-v list obsoletes', '-v list extras', '-v check-update', and '-v repolist enabled'.

Version-Release number of selected component:

Additional info:
cmdline:        /usr/bin/python /bin/dnf -v list recent
executable:     /bin/dnf
kernel:         3.7.4-204.fc18.x86_64
uid:            0

Truncated backtrace:
__init__.py:1857:doPackageLists:AttributeError: 'YumBaseCli' object has no attribute 'pkgSack'

Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 303, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 131, in main
    result, resultmsgs = cli.do_commands()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1478, in do_commands
    return command.doCommand(self.base.basecmd, self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands.py", line 539, in doCommand
    ypl = self.base.returnPkgLists(extcmds, installed_available=highlight)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 696, in returnPkgLists
  File "/usr/lib/python2.7/site-packages/dnf/yum/__init__.py", line 1857, in doPackageLists
    avail = self.pkgSack.returnNewestByNameArch(patterns=patterns,
AttributeError: 'YumBaseCli' object has no attribute 'pkgSack'

Local variables in innermost frame:
available: []
ignore_case: True
pkgnarrow: 'recent'
showdups: False
self: <dnf.cli.cli.YumBaseCli object at 0x2b75b50>
obsoletesTuples: []
reinstall_available: []
patterns: []
extras: []
ygh: <dnf.yum.misc.GenericHolder instance at 0x2b887e8>
obsoletes: []
installed: []
recentlimit: 1359577910.056804
ic: True
now: 1360182710.056804
old_available: []
updates: []
recent: []
Comment 1 "FeRD" (Frank Dana) 2013-02-06 15:36:11 EST
Created attachment 694135 [details]
File: backtrace
Comment 2 "FeRD" (Frank Dana) 2013-02-06 15:36:13 EST
Created attachment 694136 [details]
File: core_backtrace
Comment 3 "FeRD" (Frank Dana) 2013-02-06 15:36:15 EST
Created attachment 694137 [details]
File: environ
Comment 4 Ales Kozumplik 2013-02-07 02:22:20 EST

Thank you for opening the report. This is in fact not supposed to work at the moment, dnf so far lacks the capability to look into package changelists. This will be added later.
Comment 5 Panu Matilainen 2013-05-30 06:26:42 EDT
Created attachment 754771 [details]
Resurrect "list recent" functionality

(In reply to Ales Kozumplik from comment #4)
> dnf so far lacks the capability to look into package
> changelists. This will be added later.

'yum list recent' doesn't actually look at package changelogs but the physical package mtime from repository ("filetime" in eg repoquery formatting), with a configurable time for just how new packages are considered "recent".

"filetime" isn't currently available through libsolv (and unless there are some other uses for it too, doesn't seem worth adding just because of this) so this just uses what we have now and use package buildtime for determining "recent". Of course it will NOT give identical results to yum, so whether you want it at all... well, up to you :)
Comment 6 Ales Kozumplik 2013-05-30 10:41:01 EDT
Thanks for the patch, Panu, pushed:


Assigning this to you, it will get closed after the next DNF build.
Comment 7 Fedora Update System 2013-06-24 09:25:21 EDT
libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19 has been submitted as an update for Fedora 19.
Comment 8 Fedora Update System 2013-06-24 14:49:51 EDT
Package libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing libsolv-0.3.0-5.git228d412.fc19 librepo-0.0.4-2.fc19 hawkey-0.3.14-1.git78b3aa0.fc19 dnf-0.3.8-2.git85524ae.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2013-06-30 21:37:03 EDT
libsolv-0.3.0-5.git228d412.fc19, librepo-0.0.4-2.fc19, hawkey-0.3.14-1.git78b3aa0.fc19, dnf-0.3.8-2.git85524ae.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.