Bug 429751

Summary: Yum gives traceback
Product: Red Hat Enterprise Linux 5 Reporter: Jay Fenlason <fenlason>
Component: yumAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: jfeeney
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0388 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 10:22:05 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Jay Fenlason 2008-01-22 16:13:59 EST
Description of problem:
Running "yum -y update {package}" or "yum list updates" gives a traceback and 
doesn't work on fenlason-desk.boston.devel.redhat.com.

Version-Release number of selected component (if applicable):
yum-3.2.8-4.el5

How reproducible:
Always

Steps to Reproduce:
1.run "yum -y update {some package}" or "yum list updates"
2.
3.
  
Actual results:
Updating yum-metadata-parser.x86_64
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 105, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 293, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, 
self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 163, in doCommand
    return base.updatePkgs(extcmds)
  File "/usr/share/yum-cli/cli.py", line 601, in updatePkgs
    updates = self.up.getUpdatesTuples()
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 542, in 
<lambda>
    up = property(fget=lambda self: self._getUpdates(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 436, in 
_getUpdates
    sack_pkglist = self.pkgSack.simplePkgList()
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 529, in 
<lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 365, in 
_getSacks
    if self._pkgSack and thisrepo is None:
  File "/usr/lib/python2.4/site-packages/yum/packageSack.py", line 226, in 
__len__
    ret += len(sack)
ValueError: __len__() should return >= 0


Expected results:
Yum should just work.

Additional info:
Comment 1 James Antill 2008-01-22 16:21:04 EST
 Imported varient of fix (though not know about at the time). Just need some flags.
Comment 5 Petr Sklenar 2008-04-17 08:07:04 EDT
1.run "yum -y update {some package}" or "yum list updates"
2. if yum works PASS
else FAIL


OLD:PASS
NEW:PASS


---
I couldnt reproduce it, I tried update many packages, there should be some
combination of various version of yum, or yum-metadata-parser. Could someone
verify that bug on fenlason-desk.boston.devel.redhat.com ?? 
Comment 6 James Antill 2008-04-17 10:12:18 EDT
 Right it was a bug in an early yum-3.2.8 version (see comment #0) ... not in
our 3.0.1 version from GA. You can probably get the old version out of the build
system, if you want to make sure.
Comment 9 James Antill 2008-04-21 10:31:54 EDT
 Ok, cool thanks Petr ... that looks about the right version.
Comment 11 errata-xmlrpc 2008-05-21 10:22:05 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0388.html