Description of problem: Error after trying to run $ yum history stats Version-Release number of selected component: yum-3.4.3-132.fc20 Additional info: reporter: libreport-2.1.11 cmdline: /usr/bin/python /bin/yum history stats executable: /bin/yum kernel: 3.12.8-300.fc20.x86_64 runlevel: N 5 type: Python uid: 500 Truncated backtrace: yumcommands.py:2984:_hcmd_stats:TypeError: 'bool' object has no attribute '__getitem__' Traceback (most recent call last): File "/bin/yum", line 29, in <module> yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py", line 355, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 174, in main result, resultmsgs = base.doCommands() File "/usr/share/yum-cli/cli.py", line 570, in doCommands return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds) File "/usr/share/yum-cli/yumcommands.py", line 3071, in doCommand ret = self._hcmd_stats(base, extcmds) File "/usr/share/yum-cli/yumcommands.py", line 2984, in _hcmd_stats print _(" NEVRAC :"), locale.format("%6d", counts['nevrac'], True) TypeError: 'bool' object has no attribute '__getitem__' Local variables in innermost frame: num: 34362368 trans_N: <yum.history.YumHistoryTransaction instance at 0x7f9eb079acb0> self: <yumcommands.HistoryCommand instance at 0x7f9eb07acb90> extcmds: ['stats'] base: <cli.YumBaseCli object at 0x7f9eb07a6ad0> trans_1: <yum.history.YumHistoryTransaction instance at 0x7f9eb002ef38> counts: False
Created attachment 857015 [details] File: backtrace
Created attachment 857016 [details] File: environ
This should never happen, unless something has truncated, locked, or damaged the history file. (it has been already stat()'d correctly). Not sure how to reproduce, but a fix to print an error message instead is simple: commit 3eb4cf70be01ecf4484feeb6ce6233b417889f8f Author: Zdenek Pavlas <zpavlas> Date: Wed Jan 29 15:04:42 2014 +0100 Fix a possible "yum history stats" tb. BZ 1059184 diff --git a/yumcommands.py b/yumcommands.py index 8bba0c5..4214383 100644 --- a/yumcommands.py +++ b/yumcommands.py @@ -2976,6 +2976,9 @@ class HistoryCommand(YumCommand): print _("Transactions:"), 0 return counts = base.history._pkg_stats() + if not counts: + msg = _("could not open history file: %s") % base.history._db_file + raise yum.Errors.MiscError, msg trans_1 = base.history.old("1")[0] print _("Transactions:"), trans_N.tid print _("Begin time :"), time.ctime(trans_1.beg_timestamp)
@Zdeněk Pavlas thanks, there is no more error message after patching yumcommands.py
Hmm, the patch should have only got rid of the traceback. Seems it really was some transient failure (locking issue, probably). We'd need a reproducer to fix the root cause.
yum-3.4.3-135.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/yum-3.4.3-135.fc20
yum-3.4.3-135.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/yum-3.4.3-135.fc19
Package yum-3.4.3-135.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing yum-3.4.3-135.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-2482/yum-3.4.3-135.fc20 then log in and leave karma (feedback).
yum-3.4.3-137.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
yum-3.4.3-137.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.