RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 802462 - yum history stats traceback after creation of new history
Summary: yum history stats traceback after creation of new history
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.2
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: Patrik Kis
URL:
Whiteboard:
Depends On:
Blocks: 802661
TreeView+ depends on / blocked
 
Reported: 2012-03-12 15:33 UTC by Patrik Kis
Modified: 2014-01-21 06:25 UTC (History)
2 users (show)

Fixed In Version: yum-3.2.29-35.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 802661 (view as bug list)
Environment:
Last Closed: 2013-02-21 10:12:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0406 0 normal SHIPPED_LIVE yum bug fix and enhancement update 2013-02-20 20:50:44 UTC

Description Patrik Kis 2012-03-12 15:33:31 UTC
Description of problem:
After creating a new yum history file yum stats fails with traceback instead of reporting error.


Version-Release number of selected component (if applicable):
yum-3.2.29-22.el6.noarch
python-2.6.6-29.el6.x86_64

How reproducible:
always

Steps to Reproduce:
# yum history
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
ID     | Login user               | Date and time    | Action(s)      | Altered
-------------------------------------------------------------------------------
     2 | root <root>              | 2012-03-12 16:25 | Install        |    1   
     1 | root <root>              | 2012-03-12 16:25 | Erase          |    1   
history list
# yum history stats
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
File        : //var/lib/yum/history/history-2012-03-12.sqlite
Size        : 23,552
Transactions: 2
Begin time  : Mon Mar 12 16:25:30 2012
End time    : Mon Mar 12 16:25:42 2012
Counts      :
  NEVRAC :      5
  NEVRA  :      5
  NA     :      5
  NEVR   :      5
  rpm DB :      1
  yum DB :      1
history stats
# ll /var/lib/yum/history/
total 860
drwxr-xr-x. 3 root root   4096 Jan 17 08:30 2012-01-17
drwxr-xr-x. 7 root root   4096 Mar 12 12:51 2012-03-12
-rw-------. 1 root root 793600 Jan 17 08:35 history-2012-01-17.sqlite
-rw-------. 1 root root  23552 Mar 12 16:25 history-2012-03-12.sqlite
-rw-------. 1 root root  40960 Mar 12 12:51 history-2012-03-12.sqlite.old
# yum history new
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
history new
# ll /var/lib/yum/history/
total 844
drwxr-xr-x. 3 root root   4096 Jan 17 08:30 2012-01-17
drwxr-xr-x. 7 root root   4096 Mar 12 12:51 2012-03-12
-rw-------. 1 root root 793600 Jan 17 08:35 history-2012-01-17.sqlite
-rw-------. 1 root root  23552 Mar 12 16:28 history-2012-03-12.sqlite
-rw-------. 1 root root  23552 Mar 12 16:25 history-2012-03-12.sqlite.old
# yum history
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
No transactions
Error: Failed history list
# yum history stats
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
File        : //var/lib/yum/history/history-2012-03-12.sqlite
Size        : 23,552
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 276, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 129, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 438, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 1493, in doCommand
    ret = self._hcmd_stats(base, extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 1421, in _hcmd_stats
    trans_1 = base.history.old("1")[0]
IndexError: list index out of range


Actual results:
See the traceback above.

Expected results:
Any descriptive error message.

Additional info:
The yum history stats start to work again after the first yum record to history, e.g. install.

Comment 2 RHEL Program Management 2012-07-10 06:02:20 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 3 RHEL Program Management 2012-07-11 02:11:30 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 10 errata-xmlrpc 2013-02-21 10:12:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-0406.html


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