Bug 1312977 - 'dnf history info <pkgname>' command crashes in Python3
'dnf history info <pkgname>' command crashes in Python3
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2016-02-29 11:58 EST by Thomas Köller
Modified: 2016-11-28 09:26 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-11-28 09:26:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Thomas Köller 2016-02-29 11:58:33 EST
Attempting to use the 'dnf history info' command leads to a Python exception, see listing below. It also triggers a selinux alert (which I reported separately, see https://bugzilla.redhat.com/show_bug.cgi?id=1312974), but that is probably unrelated, as selinux is set to permissive mode.


[root@sarkovy ~]# dnf history info kodi
Last metadata expiration check performed 2:40:35 ago on Mon Feb 29 15:05:24 2016.
Transaction ID : 155
Begin time     : Tue Feb 23 22:54:06 2016
Begin rpmdb    : 2504:bbc4d874202f4e65c489bc9e124d09b79740a3fa
End time       :            22:56:31 2016 (145 seconds)
End rpmdb      : 2506:98d24190c9768867187a56cc03bc721cba5a2617
User           : root <root>
Return-Code    : Success
Command Line   : upgrade
Transaction performed with:
    Installed     dnf-1.1.6-2.fc23.noarch         @updates
    Installed     rpm-4.13.0-0.rc1.11.fc23.x86_64 @updates
Packages Altered:
    Upgraded breeze-icon-theme-5.18.0-1.fc23.noarch                @updates
    Upgrade                    5.19.0-1.fc23.noarch                @updates
    Install  crossguid-0-0.2.20150803git8f399e8.fc23.x86_64        @updates
    Upgraded fedpkg-1.20-2.fc23.noarch                             @@commandline
    Upgrade         1.21-2.fc23.noarch                             @updates
    Upgraded firebird-libfbembed-       @updates
    Upgrade                   @updates
    Upgrade  glibc-2.22-10.fc23.i686                               @updates
    Upgrade  glibc-2.22-10.fc23.x86_64                             @updates
    Upgraded glibc-2.22-9.fc23.i686                                @updates
    Upgraded glibc-2.22-9.fc23.x86_64                              @updates
    Upgrade  glibc-common-2.22-10.fc23.x86_64                      @updates
    Upgraded glibc-common-2.22-9.fc23.x86_64                       @updates
    Upgrade  glibc-devel-2.22-10.fc23.x86_64                       @updates
    Upgraded glibc-devel-2.22-9.fc23.x86_64                        @updates
    Upgrade  glibc-headers-2.22-10.fc23.x86_64                     @updates
    Upgraded glibc-headers-2.22-9.fc23.x86_64                      @updates
    Upgraded hwdata-0.285-2.fc23.noarch                            @updates
    Upgrade         0.286-1.fc23.noarch                            @updates
Traceback (most recent call last):
  File "/bin/dnf", line 57, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main
    errcode = main(args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main
    return _main(base, args)
  File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 112, in _main
  File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 1095, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python3.4/site-packages/dnf/cli/commands/__init__.py", line 1218, in run
    ret = self.output.historyInfoCmd(extcmds)
  File "/usr/lib/python3.4/site-packages/dnf/cli/output.py", line 1536, in historyInfoCmd
    self._historyInfoCmd(tid, pats)
  File "/usr/lib/python3.4/site-packages/dnf/cli/output.py", line 1674, in _historyInfoCmd
    self.historyInfoCmdPkgsAltered(old, pats)
  File "/usr/lib/python3.4/site-packages/dnf/cli/output.py", line 1749, in historyInfoCmdPkgsAltered
    x, m, u = dnf.yum.packages.parsePackages([hpkg], pats)
  File "/usr/lib/python3.4/site-packages/dnf/yum/packages.py", line 76, in parsePackages
TypeError: unhashable type: 'YumHistoryPackageState'
[root@sarkovy ~]#
Comment 1 Fedora Admin XMLRPC Client 2016-07-08 05:38:07 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 2 Fedora End Of Life 2016-11-24 10:50:42 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 3 Michael Mráka 2016-11-28 09:26:09 EST
Seems to be fixed in rawhide.


#  dnf history info zsh
Last metadata expiration check: 0:05:12 ago on Mon Nov 28 15:19:42 2016 CET.
Transaction ID : 5
Begin time     : Fri Nov 11 14:57:16 2016
Begin rpmdb    : 346:a204f9136ef997aa41f95e5bd32768b7acb50511
End time       :            14:57:23 2016 (7 seconds)
End rpmdb      : 347:e255f8c34ab1bc8f187a8f67386916796e744e4f
User           : root <root>
Return-Code    : Success
Command Line   : install zsh
Transaction performed with:
    Installed     dnf-2.0.0-0.rc1.4.fc26.noarch @rawhide/24
    Upgraded      rpm-4.13.0-3.fc26.x86_64      @rawhide/24
Packages Altered:
    Install zsh-5.2-5.fc24.x86_64 @rawhide

Feel free to reopen if you disagree.

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