Bug 212095 - package-cleanup --problems fails after upgrade
package-cleanup --problems fails after upgrade
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: yum-utils (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Lauridsen
Fedora Extras Quality Assurance
:
: 228671 240305 (view as bug list)
Depends On:
Blocks: FE7Target
  Show dependency treegraph
 
Reported: 2006-10-24 20:20 EDT by Sebastian Vahl
Modified: 2014-01-21 18:24 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-10-05 02:45:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
package-cleanup with some debug output (13.41 KB, text/x-python)
2007-01-26 09:28 EST, Tim Lauridsen
no flags Details

  None (edit)
Description Sebastian Vahl 2006-10-24 20:20:53 EDT
Description of problem: A "package-cleanup --problems" fails with following message:

Setting up yum
Reading local RPM database
Processing all local requires
Traceback (most recent call last):
  File "/usr/bin/package-cleanup", line 348, in ?
    main()
  File "/usr/bin/package-cleanup", line 345, in main
    provsomething = buildProviderList(my,pkgs,opts.problems)
  File "/usr/bin/package-cleanup", line 85, in buildProviderList
    resolve_sack = my.rpmdb.whatProvides(req,rflags,ver)
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 361, in whatProvides
    pkgs = self.searchProvides(name)
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 139, in
searchProvides
    return self.searchPrco(name, 'provides')
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 120, in searchPrco
    if not result.has_key(po.pkgid):
TypeError: list objects are unhashable

Reinstalling of yum and yum-utils didn't help.



Version-Release number of selected component (if applicable): yum-utils-1.0-2.fc6
Comment 1 Tim Lauridsen 2007-01-14 03:34:45 EST
I have tested

package-cleanup --problems

with 
yum 3.0.3 & yum-utils-1.0.1 

It like the issue don't exist anymore.

Please retest.
Comment 2 Sebastian Vahl 2007-01-16 11:03:42 EST
Still the same problem:

root@work:~# rpm -q yum yum-utils
yum-3.0.3-1.fc6
yum-utils-1.0.1-1.fc6
root@work:~# package-cleanup --problems
Setting up yum
Reading local RPM database
Processing all local requires
Traceback (most recent call last):
  File "/usr/bin/package-cleanup", line 349, in ?
    main()
  File "/usr/bin/package-cleanup", line 346, in main
    provsomething = buildProviderList(my,pkgs,opts.problems)
  File "/usr/bin/package-cleanup", line 85, in buildProviderList
    resolve_sack = my.rpmdb.whatProvides(req,rflags,ver)
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 390, in whatProvides
    pkgs = self.searchProvides(name)
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 141, in
searchProvides
    return self.searchPrco(name, 'provides')
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 123, in searchPrco
    if not result.has_key(po.pkgid):
TypeError: list objects are unhashable
Comment 3 Tim Lauridsen 2007-01-26 09:28:00 EST
Created attachment 146681 [details]
package-cleanup with some debug output
Comment 4 Tim Lauridsen 2007-01-26 09:31:16 EST
I have add at package-cleanup.py with some debug output, to find out what
package causing the the problem.

run the following.

python package-cleanup.py --problems and attach the output just before the TypeError
Comment 5 Jacek Piskozub 2007-02-02 17:00:28 EST
I did that as I had the same error. THis is the end of the output:



req    : python
rflags : 8
ver    : 2.4.4-1.fc6
req    : python-popt
rflags : 0
ver    : None
Traceback (most recent call last):
[...] 

So it's a prehistoric package, namely python-popt-0.8.8-7.x.2  installed on    
                  April 11, 2002.

After removing it, I had the same problem with metamail-2.7-28. It's interesting
as metamail-2.7-29.7.x.legacy does not give the problem on another Fedora 6 box
I administer. After upgrading (yes, I need it!) the problem stopped.

The thing is package-cleanup --problems should not die on prehistoric packages.
Or at est it should not die without any debugging output about who killed it.
Comment 6 Sebastian Vahl 2007-02-07 03:12:19 EST
Also tried the debug version:


[...]
ver    : None 
req    : libXext.so.6 
rflags : 0 
ver    : None 
req    : libXi.so.6 
rflags : 0 
ver    : None 
req    : libcnbpcmcm154.so 
rflags : 0 
ver    : None 
Traceback (most recent call last):
  File "./package-cleanup.py", line 405, in ?
    main()
  File "./package-cleanup.py", line 402, in main
    provsomething = buildProviderList(my,pkgs,opts.problems)
  File "./package-cleanup.py", line 88, in buildProviderList
    resolve_sack = my.rpmdb.whatProvides(req,rflags,ver)
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 390, in whatProvides
    pkgs = self.searchProvides(name)
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 141, in
searchProvides
    return self.searchPrco(name, 'provides')
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 123, in searchPrco
    if not result.has_key(po.pkgid):
TypeError: list objects are unhashable

libcnbpcmcm154.so is provided by bjfilterpixus550i-2.2-1. This is the only
available official driver for my canon printer (and not included in fedora).
After removing it, the normal version of package-cleanup works fine.
Comment 7 Tim Lauridsen 2007-02-14 09:36:58 EST
*** Bug 228671 has been marked as a duplicate of this bug. ***
Comment 8 Tim Lauridsen 2007-06-18 05:56:08 EDT
*** Bug 240305 has been marked as a duplicate of this bug. ***
Comment 9 Vince Schiavoni 2007-07-15 22:08:34 EDT
I also have the same problem, so I ran the python attachment:

[root@presario /home/Shared]# python package-cleanup.py --problems
Setting up yum
Excluding Packages in global exclude list
Finished
Reading local RPM database
Processing all local requires
[...]
req    : rtld(GNU_HASH)
rflags : 0
ver    : None
req    : libX11.so.6
rflags : 0
ver    : None
Traceback (most recent call last):
  File "package-cleanup.py", line 405, in ?
    main()
  File "package-cleanup.py", line 402, in main
    provsomething = buildProviderList(my,pkgs,opts.problems)
  File "package-cleanup.py", line 88, in buildProviderList
    resolve_sack = my.rpmdb.whatProvides(req,rflags,ver)
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 390, in whatProvides
    pkgs = self.searchProvides(name)
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 141, in
searchProvides
    return self.searchPrco(name, 'provides')
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 123, in searchPrco
    if not result.has_key(po.pkgid):
TypeError: list objects are unhashable
[root@presario /home/Shared]# locate libX11.so.6
/usr/lib/libX11.so.6
/usr/lib/libX11.so.6.2.0
[...]
[root@presario /home/Shared]# rpm -qf /usr/lib/libX11.so.6
libX11-1.0.3-7.fc6
[root@presario /home/Shared]#

Since I'm fairly sure that I cannot safely remove libX11 without causing a major
meltdown, there is no work-around or quick-fix here like the other guys did.  I
am wondering if this is a more serious problem with yum itself?

uname -a: Linux 2.6.20-1.2952.fc6 #1 SMP Wed May 16 18:59:18 EDT 2007 i686
athlon i386 GNU/Linux
Comment 10 Kyle Pablo 2007-08-27 12:46:16 EDT
I am running into the problem on FC6, latest kernel-2.6.22.2-42.fc6,
yum-utils-1.0.3-1.fc6.

Heres my dump:

[doctorwhite@localhost ~]$ sudo package-cleanup --problems
Setting up yum
Reading local RPM database
Processing all local requires
Traceback (most recent call last):
  File "/usr/bin/package-cleanup", line 402, in ?
    main()
  File "/usr/bin/package-cleanup", line 399, in main
    provsomething = buildProviderList(my,pkgs,opts.problems)
  File "/usr/bin/package-cleanup", line 85, in buildProviderList
    resolve_sack = my.rpmdb.whatProvides(req,rflags,ver)
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 390, in whatProvides
    pkgs = self.searchProvides(name)
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 141, in
searchProvides
    return self.searchPrco(name, 'provides')
  File "/usr/lib/python2.4/site-packages/yum/rpmsack.py", line 123, in searchPrco
    if not result.has_key(po.pkgid):
TypeError: list objects are unhashable
Comment 11 Tom Chiverton 2007-09-29 14:41:20 EDT
Same problem here:
# rpm -q kernel;rpm -qa|grep yum
kernel-2.6.20-1.2320.fc5.x86_64
kernel-2.6.22.9-91.fc7.x86_64
yum-metadata-parser-1.1.0-2.fc7.x86_64
yum-utils-1.1.7-1.fc7.noarch
yum-kernel-module-1.1.7-1.fc7.noarch
yum-3.2.5-1.fc7.noarch
# rpm -qf /etc/fedora-release
fedora-release-7-3.noarch

# yum update
fedora                    100% |=========================| 2.1 kB    00:00
updates                   100% |=========================| 2.3 kB    00:00
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 143, in main
    (result, resultmsgs) = base.buildTransaction()
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 569, 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
Comment 12 Ville Herva 2007-10-05 01:11:02 EDT
(In reply to comment #11)
> Same problem here:
> # rpm -q kernel;rpm -qa|grep yum
> TypeError: list objects are unhashable


I'm still seeing this as well.
I found a workaround, see 

https://devel.linux.duke.edu/bugzilla/show_bug.cgi?id=726#c5

Comment 13 Tim Lauridsen 2007-10-05 02:45:30 EDT
Fixed upstream

http://devel.linux.duke.edu/gitweb/?p=yum.git;a=commitdiff;h=2ad0940a196ffb694c03b827fad3f6a7b6816108

will be available in yum 3.2.6

Comment 14 Tom Chiverton 2007-10-05 15:35:28 EDT
Ah ha.
That explains the other 'solution' to the problem I discovered to day.
Parse 'rpm -qa' for all package from my previous Fedora version, feed them one
at a time into 'yum upgrade'.
For each that explodes, 'rpm -e --nodeps;yum -y install' it.

Glad to see the fix going in after all this time, and the link to the upstream
change is just a one line change in the mean time :-)

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