Hide Forgot
Description of problem: sudo dnf history info is failing when I try to see any history information. Version-Release number of selected component (if applicable): $ dnf --version 1.1.6 Instalados: dnf-0:1.1.6-1.fc23.noarch em 2016-01-28 21:01 Construídos : Fedora Project em 2016-01-26 09:15 Instalados: rpm-0:4.13.0-0.rc1.7.fc23.x86_64 em 2015-12-21 01:01 Construídos : Fedora Project em 2015-11-20 13:08 How reproducible: Everytime. Steps to Reproduce: 1. Open a terminal window 2. Enter the following command: sudo dnf history info 1 Actual results: Last metadata expiration check performed 2:36:42 ago on Fri Jan 29 12:13:12 2016. Transaction ID : 1 Begin time : Sun Dec 20 23:00:07 2015 Begin rpmdb : 1450:038679f4ecb3a27c81539c68f428de6a1e197488 End time : 23:12:43 2015 (12 minutes) End rpmdb : 1461:fc317025642fedf4b6dfc792c5a9042be7b1ad16 User : xxx Return-Code : Success Transaction performed with: 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 cli.run() 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 1672, in _historyInfoCmd _simple_pkg(hpkg, 4, was_installed=True, pkg_max_len=pkg_max_len) File "/usr/lib/python3.4/site-packages/dnf/cli/output.py", line 1575, in _simple_pkg elif ipkgs[-1] > hpkg: File "/usr/lib64/python3.4/functools.py", line 125, in _lt_from_le op_result = self.__le__(other) File "/usr/lib/python3.4/site-packages/dnf/yum/history.py", line 166, in __le__ o = other.to_nevra() AttributeError: 'Package' object has no attribute 'to_nevra' Expected results: Show detailed history information. Additional info:
This is a duplicate of 1302172.
*** Bug 1302172 has been marked as a duplicate of this bug. ***
*** Bug 1302510 has been marked as a duplicate of this bug. ***
*** Bug 1303470 has been marked as a duplicate of this bug. ***
*** Bug 1303646 has been marked as a duplicate of this bug. ***
Fixed in the upstream [1], new release should be soon. [1] https://github.com/rpm-software-management/dnf/commit/c9217ab14cc5bee85d5a93d8a8b740651cc99aee
dnf-1.1.6-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-10da20f298
dnf-1.1.6-2.fc22 dnf-plugins-core-0.1.16-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-573eba7b37
dnf-1.1.6-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-10da20f298
dnf-1.1.6-2.fc22, dnf-plugins-core-0.1.16-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-573eba7b37
I just set up a Fedora 23 VM using netinstall to see whether the update fixes the issue. For some reason `dnf history info 2` worked with dnf 1.1.6-1 (the old version) just fine. Perhaps the history is not that large and that corner case did not happen there? The machine that the error occurred for me is my production machine, I am a bit reluctant to test an update to the package manager there :-/.
You can copy your /var/lib/dnf/history/ from production machine and try the fix inside VM.
I deleted everything under `/var/lib/dnf/history/` in the virtual machine and copied the files from the production machine into that directly. Running `dnf history` then gave me the whole list of transactions. Drilling down to the interesting transaction with `dnf history info awesome` got me a different error this time: Die letzte Prüfung auf abgelaufene Metadaten wurde vor 2:26:23 am Thu Feb 4 11:58:59 2016 ausgeführt. Transaktions-ID : 208 Anfangszeit : Tue Feb 2 18:49:02 2016 Anfang rpmdb : 4505:34e2a6f6c0fc4e4d27680558756611f14f9ce9da Endzeit : 18:49:04 2016 (2 Sekunden) Ende rpmdb : 4505:0ed8145a64bab51edc89131dcfe27d2899c84cb8 Benutzer : Martin Ueding <mu> Rückgabe-Code : Erfolg Befehlszeile : update awesome --enablerepo=updates-testing Transaktion ausgeführt mit: Aktualisiert dnf-1.1.6-1.fc23.noarch @updates Installiert rpm-4.13.0-0.rc1.10.fc23.x86_64 @updates Veränderte Pakete: Traceback (most recent call last): File "/usr/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 cli.run() 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 exactmatch.update(pkgdict[command]) TypeError: unhashable type: 'YumHistoryPackageState' That bug has already been reported as #1245121. Then I tried this same thing on my production machine with the old dnf (1.1.6-1) and get the same error, nothing about `to_nevra`. So this `to_nevra` bug only occurs for certain transactions. Presumably the update of awesome using `--enablerepo=updates-testing` has created some different transaction and therefore there is some other error. A thing which does make a difference is the history for git. When I do `dnf history info git` on the old dnf version, I get the `to_nevra`-error on both the VM (I downgraded dnf for testing) and the production machine. After upgrading dnf to 1.1.6-2 again the error changed from `to_nevra` to this `YumHistoryPackageState` error. So presumably the `to_nevra` bug is fixed now and the `YumHistoryPackageState` is just independet of that. Shall I give a +1 on Bodhi for this update, then?
dnf-1.1.6-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
dnf-1.1.6-2.fc22, dnf-plugins-core-0.1.16-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
dnf-plugins-core-0.1.17-1.fc23 dnf-1.1.7-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0123ce82c1
dnf-plugins-core-0.1.17-1.fc22 dnf-1.1.7-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f673381075
dnf-1.1.7-2.fc23 dnf-plugins-core-0.1.17-1.fc23 libsolv-0.6.19-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-0123ce82c1
dnf-1.1.7-2.fc22 dnf-plugins-core-0.1.17-1.fc22 libsolv-0.6.19-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f673381075
dnf-1.1.7-2.fc22, dnf-plugins-core-0.1.17-1.fc22, libsolv-0.6.19-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f673381075
dnf-1.1.7-2.fc23, dnf-plugins-core-0.1.17-1.fc23, libsolv-0.6.19-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-0123ce82c1
dnf-1.1.7-2.fc23, dnf-plugins-core-0.1.17-1.fc23, libsolv-0.6.19-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
dnf-1.1.7-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-c030d24231
dnf-1.1.7-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-c030d24231
dnf-1.1.7-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.