Red Hat Bugzilla – Bug 908491
[rfe] list recent
Last modified: 2013-06-30 21:37:03 EDT
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:
cmdline: /usr/bin/python /bin/dnf -v list recent
__init__.py:1857:doPackageLists:AttributeError: 'YumBaseCli' object has no attribute 'pkgSack'
Traceback (most recent call last):
File "/bin/dnf", line 35, in <module>
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:
self: <dnf.cli.cli.YumBaseCli object at 0x2b75b50>
ygh: <dnf.yum.misc.GenericHolder instance at 0x2b887e8>
Created attachment 694135 [details]
Created attachment 694136 [details]
Created attachment 694137 [details]
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.
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 :)
Thanks for the patch, Panu, pushed:
Assigning this to you, it will get closed after the next DNF build.
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.
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).
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.