Bug 908491

Summary: [rfe] list recent
Product: [Fedora] Fedora Reporter: "FeRD" (Frank Dana) <ferdnyc>
Component: dnfAssignee: Panu Matilainen <pmatilai>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: akozumpl, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:407f2aeb597733a68e3e37472c112efc5e0e5787
Fixed In Version: libsolv-0.3.0-5.git228d412.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-01 01:37:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: core_backtrace
none
File: environ
none
Resurrect "list recent" functionality none

Description "FeRD" (Frank Dana) 2013-02-06 20:36:08 UTC
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:
dnf-0.2.20-1.gitdec970f.fc18

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
    ignore_case=True)
  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 20:36:11 UTC
Created attachment 694135 [details]
File: backtrace

Comment 2 "FeRD" (Frank Dana) 2013-02-06 20:36:13 UTC
Created attachment 694136 [details]
File: core_backtrace

Comment 3 "FeRD" (Frank Dana) 2013-02-06 20:36:15 UTC
Created attachment 694137 [details]
File: environ

Comment 4 Ales Kozumplik 2013-02-07 07:22:20 UTC
Hello,

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 10:26:42 UTC
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 14:41:01 UTC
Thanks for the patch, Panu, pushed:

https://github.com/akozumpl/dnf/commit/b85ab047a29bdde63f61b1b8f8ad7f898b5d98ea

Assigning this to you, it will get closed after the next DNF build.

Comment 7 Fedora Update System 2013-06-24 13:25:21 UTC
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.
https://admin.fedoraproject.org/updates/libsolv-0.3.0-5.git228d412.fc19,dnf-0.3.8-2.git85524ae.fc19,hawkey-0.3.14-1.git78b3aa0.fc19,librepo-0.0.4-2.fc19

Comment 8 Fedora Update System 2013-06-24 18:49:51 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2013-11602/libsolv-0.3.0-5.git228d412.fc19,dnf-0.3.8-2.git85524ae.fc19,hawkey-0.3.14-1.git78b3aa0.fc19,librepo-0.0.4-2.fc19
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2013-07-01 01:37:03 UTC
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.