Bug 291471

Summary: F7 'yum upgrade' fails for 7.91 repository
Product: [Fedora] Fedora Reporter: Michael McLagan <mmclagan>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: 7CC: dto, james.antill, nerijus, pmatilai, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-18 18:29:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
RPM DB producing error in YUM none

Description Michael McLagan 2007-09-14 19:00:50 UTC
Description of problem:

Yum upgrade fails against 7.91 repository

Version-Release number of selected component (if applicable):

~]$ rpm -q yum
yum-3.2.4-2.fc7

How reproducible:

Always

Steps to Reproduce:
1. Create repo for 7.91 on an Fedora 7 system
2. execute yum --downloadonly upgrade
3.
  
Actual results:

---> Package pm-utils.i386 0:0.99.3-11.fc8 set to be updated
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 143, in main
    (result, resultmsgs) = base.buildTransaction() 
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 565, in
buildTransaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 710, in resolveDeps
    CheckDeps, checkremoves, checkinstalls, missing = self._resolveRequires(errors)
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 787, in
_resolveRequires
    thisneeds = self._checkRemove(txmbr)
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 865, in _checkRemove
    for pkg, hits in self.tsInfo.getRequires(*prov).iteritems():
  File "/usr/lib/python2.5/site-packages/yum/transactioninfo.py", line 427, in
getRequires
    result = self.getOldRequires(name, flag, version)
  File "/usr/lib/python2.5/site-packages/yum/transactioninfo.py", line 420, in
getOldRequires
    for pkg, hits in self.rpmdb.getRequires(name, flag, version).iteritems():
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 425, in getRequires
    pkgs = self.searchRequires(name)
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 149, in
searchRequires
    return self.searchPrco(name, 'requires')
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 128, in searchPrco
    if not result.has_key(po.pkgid):
TypeError: list objects are unhashable

Expected results:

Be nice if it finished and downloaded :)

Additional info:

Comment 1 Seth Vidal 2007-09-17 20:24:12 UTC
*** Bug 292431 has been marked as a duplicate of this bug. ***

Comment 2 Jeremy Katz 2007-09-17 23:49:25 UTC
Can you edit /usr/lib/python2.5/site-packages/yum/rpmsack.py and add a line
above line 128 (the "if not result.has_key(po.pkgid):") of
  print po
with the same indentation?



Comment 3 Michael McLagan 2007-09-18 05:31:07 UTC
The above generated 2500+ lines, ending in:

perl - 4:5.8.8-23.fc7.i386
perl - 4:5.8.8-23.fc7.i386
freshrpms - 0.7.3-1.noarch
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.main(sys.argv[1:])


Comment 4 Michael McLagan 2007-09-18 06:10:46 UTC
I executed an 'rpm --rebuilddb' to see if it made a difference and got:

perl-ExtUtils-MakeMaker - 6.30-23.fc7.i386
perl-ExtUtils-MakeMaker - 6.30-23.fc7.i386
freshrpms - 0.7.3-1.noarch
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>

So I tried removing the freshrpms package and yum ran through to the end.  It
complained about a number of dependencies, but it didn't produce the error.  I
reinstalled the freshrpms package and again yum completed it's run without
generating the error.  That likely removed the glitch from my DB.  Might want to
ask the guy from #292431 since he seems to have the same problem.


Comment 5 Michael McLagan 2007-09-18 06:31:55 UTC
Looks like we're not "dead" yet. I tried a different machine and it produced the
same error message.  This time, I zipped up the RPM DB, copied it to another
machine and tried there.  The error reproduces itself, so I will be attaching a
password protected rpmdb zip file to this bug.

Comment 6 Michael McLagan 2007-09-18 06:55:14 UTC
Created attachment 198131 [details]
RPM DB producing error in YUM

Password emailed directly to Jeremy Katz

Comment 7 Jeremy Katz 2007-09-18 18:29:03 UTC
Thanks, that helped a lot.  Fixed in upstream yum and will be in 3.2.6

Comment 8 Fedora Update System 2007-10-08 15:00:32 UTC
yum-3.2.6-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum'

Comment 9 Fedora Update System 2007-10-10 19:33:48 UTC
yum-3.2.6-2.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update yum'