Bug 246103

Summary: "yum update" fails "TypeError: list objects are unhashable"
Product: [Fedora] Fedora Reporter: shinkr <shinkr>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 7CC: james.antill
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-07-06 20:18:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description shinkr 2007-06-28 15:10:24 UTC
Description of problem:

"yum update" fails "TypeError: list objects are unhashable".

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

# rpm -qa | grep yum
yum-metadata-parser-1.1.0-2.fc7
yum-3.2.0-1.fc7 (and yum-3.2.1-1.fc7)

# rpm -qa | grep python
libselinux-python-2.0.13-1.fc7
python-urlgrabber-2.9.9-5.fc7
rpm-python-4.4.2-46.fc7
python-2.5-12.fc7
libxml2-python-2.6.28-2
python-libs-2.5-12.fc7


How reproducible:

    all the time

Steps to Reproduce:
1. yum update
2.
3.
  
Actual results:

##################################################################

# yum update
Loading "installonlyn" plugin
Setting up Update Process
Resolving Dependencies
--> Running transaction check
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 135, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 549, in 
buildTransaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 794, in 
resolveDeps
    deps = self._mytsCheck()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 773, in 
_mytsCheck
    ret.extend(self._checkInstall(txmbr))
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 975, in 
_checkInstall
    inst = self.rpmdb.whatProvides(r, None, None)
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 386, in 
whatProvides
    pkgs = self.searchProvides(name)
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 145, in 
searchProvides
    return self.searchPrco(name, 'provides')
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 127, in 
searchPrco
    if not result.has_key(po.pkgid):
TypeError: list objects are unhashable

##################################################################



Expected results:


Additional info:

"yum list updates" is OK.
"yum remove xxx" is OK.
"yum update xxx" is OK on the situation.

Comment 1 Jeremy Katz 2007-06-28 15:44:10 UTC
Can you edit /usr/lib/python2.5/site-packages/yum/rpmsack.py and add a line
right above line 127 that is
   print po

and then give the output?

Comment 2 shinkr 2007-06-29 03:49:58 UTC
result of Edit and execute.

##################################################################

# yum update
Loading "installonlyn" plugin
Setting up Update Process
Resolving Dependencies
--> Running transaction check
rpm - 4.4.2-46.fc7.ppc
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 135, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 527, in 
buildTransaction
    (rescode, restring) = self.resolveDeps()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 804, in 
resolveDeps
    deps = self._mytsCheck()
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 776, in 
_mytsCheck
    thisneeds = self._checkRemove(txmbr)
  File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 1044, in 
_checkRemove
    for pkgtup in self.rpmdb.whatRequires(provname, None, None):
  File "/usr/lib/python2.5/site-packages/yum/rpmsack.py", line 423, in 
whatRequires
    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

##################################################################

This result is ptinting bad packagename...


Comment 3 Jeremy Katz 2007-07-06 20:18:31 UTC
Okay, this is fixed up in CVS and will go out as the next yum update

Comment 4 shinkr 2007-07-10 03:33:02 UTC
Thank you for correspondence. 
When will it be in the next update time?