LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   package manager not working (https://www.linuxquestions.org/questions/linux-newbie-8/package-manager-not-working-34310/)

glennp 11-01-2002 12:59 AM

package manager not working
 
In 8.0, my redhat package manager scans for packages then just closes. I can't uninstall or install new packages from the CD's. When run in a terminal it gives me:
Traceback (most recent call last):
File "/usr/share/redhat-config-packages/MainWindow.py", line 163, in ?
comps = im.readCompsViaMethod(hdlist, progress.update)
File "/usr/share/redhat-config-packages/method.py", line 488, in readCompsViaMethod
update_method = update_method)
File "/usr/share/redhat-config-packages/comps.py", line 387, in __init__
self.readCompsFile(file, self.packages)
File "/usr/share/redhat-config-packages/comps.py", line 471, in readCompsFile
self.setupStateDicts(packages)
File "/usr/share/redhat-config-packages/comps.py", line 420, in setupStateDicts
for prov in h[rpm.RPMTAG_PROVIDES]:
TypeError: iteration over non-sequence

Don't know how this happened because it was working earlier. I recently tried to install xine and Mplayer. Maybe that had something to do with it.
thanks for any help. :)

Panther505 11-01-2002 06:13 PM

Try this;


su -
cd /var/lib/rpm
rm -f _*


then you can do a-

rpm -rebuilddb

then you should be up and running again...


This is an issue that I have had on occasion with 8.0

glennp 11-02-2002 02:35 AM

I tried what you said and it's still giving me the same error. @#$%^
Confused should be my name. Help. :)
Any other suggestions??

glennp 11-04-2002 12:06 AM

I actually ran it again and the error that it came up with was with a warning this time:

(MainWindow.py:1332): Gtk-WARNING **: /usr/lib/gtk-2.0/2.0.0/engines/libredmond95.so: undefined symbol: gtk_rc_style_get_type
Traceback (most recent call last):
File "/usr/share/redhat-config-packages/MainWindow.py", line 163, in ?
comps = im.readCompsViaMethod(hdlist, progress.update)
File "/usr/share/redhat-config-packages/method.py", line 488, in readCompsViaMethod
update_method = update_method)
File "/usr/share/redhat-config-packages/comps.py", line 387, in __init__
self.readCompsFile(file, self.packages)
File "/usr/share/redhat-config-packages/comps.py", line 471, in readCompsFile
self.setupStateDicts(packages)
File "/usr/share/redhat-config-packages/comps.py", line 420, in setupStateDicts
for prov in h[rpm.RPMTAG_PROVIDES]:
TypeError: iteration over non-sequence

Maybe this helps some. thanks to all....

millionyearsold 12-09-2002 05:35 PM

I had the same problem, tried the same solution with the same result - i.e. I still had the problem. Quite a few people are experiencing this. Anyway I have a fix (or hack) that seems to work for me though I can't vouch for its validity - then again when you take a look at comps.py you will see there are plenty of hacks and fixme code already so it would seem that RH can't vouch for its validity either.

Add this line immeadiately before line 420 in comps.py (listed in your traceback):

if h[rpm.RPMTAG_PROVIDES] is not None:

Make sure that the indents are correct before and after this line i.e the two lines immeadiatly after should be indented to the right of this line so it should look like this:

if h[rpm.RPMTAG_PROVIDES] is not None:
>>>>for prov in h[rpm.RPMTAG_PROVIDES]:
>>>>>>>>self.instProvs[prov] = pkg

- where > is a space. The "if" line should have the same indent as the previous if statement in comps.py.

The problem is probably occuring because there are one or more entries in the rpm make up that redhat-config-packages cannot cope with. This might be because the rpm database is wrong or it might be because of a bug in redhat-config-packages - I am no expert on either. Neither am I an expert in python which is what I assume comps.py is written in. However, the fix/hack checks that the thing at index rpm.RPMTAG_PROVIDES in h has some content before trying to iterate over that content. Just to re-iterate: I don't know if this is a valid solution, use at your own risk and remember to make a copy of comps.py before you edit it.

forkb0y 01-03-2003 09:39 AM

thanks millionyearsold, that worked for me as you stated. always nice to see a quote stating the following code is 'kind of wierd'. I'm sure corporate sysadmins love to share these tidbits with their keepers!


All times are GMT -5. The time now is 10:32 AM.