Bug 74877 - Autorun on 8.0 installation cd crashes
Summary: Autorun on 8.0 installation cd crashes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: redhat-config-packages
Version: 8.0
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Brock Organ
URL:
Whiteboard:
: 77343 77904 81017 84303 84375 85051 86030 86329 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-02 15:03 UTC by David Hawkins
Modified: 2007-04-18 16:47 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-04-22 04:16:52 UTC


Attachments (Terms of Use)

Description David Hawkins 2002-10-02 15:03:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

Description of problem:
Autorun on the RH8.0 installation cd crashes. When run from the terminal it
yields the following results.  

Traceback (most recent call last):
  File "/usr/share/redhat-config-packages/InstallDruid.py", line 529, in ?
    druid.run ()
  File "/usr/share/redhat-config-packages/InstallDruid.py", line 464, in run
    self.do_system_info_state ()
  File "/usr/share/redhat-config-packages/InstallDruid.py", line 350, in
do_system_info_state
    self.comps = self.method.readCompsViaMethod(hdlist, self.simple_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


It appears that it is trying to iterate over the RPM providers when some are not
actually arrays.  

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


How reproducible:
Always

Steps to Reproduce:
1. cd /mnt/cdrom
2. ./autorun
3.
	

Actual Results:  Traceback (most recent call last):
  File "/usr/share/redhat-config-packages/InstallDruid.py", line 529, in ?
    druid.run ()
  File "/usr/share/redhat-config-packages/InstallDruid.py", line 464, in run
    self.do_system_info_state ()
  File "/usr/share/redhat-config-packages/InstallDruid.py", line 350, in
do_system_info_state
    self.comps = self.method.readCompsViaMethod(hdlist, self.simple_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

Additional info:

The error is in /usr/share/redhat-config-packages/comps.py and I have created a
patch for the error. If this paste doesn't come out well I can provide a better
patch via email.

--- comps.py    2002-10-02 09:21:21.000000000 -0500
+++ dhawkins.comps.py   2002-10-02 08:59:19.000000000 -0500
@@ -416,9 +416,14 @@
                 if (pkg == "glibc-debug" or pkg == "kde2-compat"
                     or pkg.startswith("kernel-") or pkg == "qt2-Xt"):
                     continue
-
-                for prov in h[rpm.RPMTAG_PROVIDES]:
-                    self.instProvs[prov] = pkg
+
+                try:
+                    for prov in h[rpm.RPMTAG_PROVIDES]:
+                        self.instProvs[prov] = pkg
+                except TypeError:
+                    for prov in (h[rpm.RPMTAG_PROVIDES],):
+                        self.instProvs[prov] = pkg
+
             else:
                 # FIXME: these packages provide things that are needed
                 # in some of the other packages.  they're kind of weird
@@ -428,8 +433,14 @@
                     or pkg.startswith("kernel-") or pkg == "qt2-Xt"):
                     continue

-                for prov in self.packages[pkg][rpm.RPMTAG_PROVIDES]:
-                    self.providesDict[prov] = self.packages[pkg]
+        try:
+            for prov in self.packages[pkg][rpm.RPMTAG_PROVIDES]:
+                self.providesDict[prov] = self.packages[pkg]
+        except TypeError:
+            for prov in (self.packages[pkg][rpm.RPMTAG_PROVIDES],):
+                self.providesDict[prov] = self.packages[pkg]
+
+

         # now let's generate the requires dict so that we can try to
         # be intelligent on removals... again, this doesn't really

Comment 1 Tim Powers 2002-10-02 15:11:54 UTC
This is a problem with redhat-config-packages and not the comps file itself.
Changing the component so it's assigned to the correct person.

Tim

Comment 2 Jeremy Katz 2002-10-02 18:36:50 UTC
I haven't seen that on any of my machines -- if you add a patch like the
following, what package is it failing on?

Index: comps.py
===================================================================
RCS file: /usr/local/CVS/redhat-config-packages/src/comps.py,v
retrieving revision 1.30
diff -u -u -r1.30 comps.py
--- comps.py    30 Aug 2002 21:48:09 -0000      1.30
+++ comps.py    2 Oct 2002 18:30:54 -0000
@@ -417,6 +417,7 @@
                     or pkg.startswith("kernel-") or pkg == "qt2-Xt"):
                     continue

+                print h[rpm.RPMTAG_NAME]
                 for prov in h[rpm.RPMTAG_PROVIDES]:
                     self.instProvs[prov] = pkg
             else:
@@ -428,6 +429,7 @@
                     or pkg.startswith("kernel-") or pkg == "qt2-Xt"):
                     continue

+                print h[rpm.RPMTAG_NAME]
                 for prov in self.packages[pkg][rpm.RPMTAG_PROVIDES]:
                     self.providesDict[prov] = self.packages[pkg]


Comment 3 David Hawkins 2002-10-10 13:05:40 UTC
It fails on kernel as  displayed below. The patch you offerred didn't quite
work. I had to change the second print to read:
     print self.packages[pkg][rpm.RPMTAG_NAME]
instead of:
     print h[rpm.RPMTAG_NAME]


kernel
Traceback (most recent call last):
  File "/usr/share/redhat-config-packages/InstallDruid.py", line 529, in ?
    druid.run ()
  File "/usr/share/redhat-config-packages/InstallDruid.py", line 464, in run
    self.do_system_info_state ()
  File "/usr/share/redhat-config-packages/InstallDruid.py", line 350, in
do_system_info_state
    self.comps = self.method.readCompsViaMethod(hdlist, self.simple_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 472, 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


Comment 4 Jeremy Katz 2002-10-11 20:18:46 UTC
Oops, cut-and-pasto.  

So what is the output of
`rpm -q kernel --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\t[%{PROVIDENAME}
]\n"` since you somehow seem to have a kernel package without any provides.

Comment 5 Jeremy Katz 2002-10-11 20:23:18 UTC
(I've also committed some code to CVS to handle this a little bit better, but
I'm still curious as to what kernel package doesn't have any provides)

Comment 6 David Hawkins 2002-10-11 20:53:34 UTC
rpm -q kernel --qf "\"%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\t[%{PROVIDENAME}]\"\n"
"kernel-2.4.18-14.i386  "

I added the quotes so the boundries were clear.

--David

Comment 7 Jeremy Katz 2002-10-11 21:11:57 UTC
Okay, fixed in CVS -- I'll hopefully be putting up a new version of
redhat-config-packages later tonight at
http://people.redhat.com/~katzj/redhat-config-packages/

Comment 8 Jeremy Katz 2002-11-05 18:11:36 UTC
*** Bug 77343 has been marked as a duplicate of this bug. ***

Comment 9 Jeremy Katz 2002-11-15 00:35:11 UTC
*** Bug 77904 has been marked as a duplicate of this bug. ***

Comment 10 Jeremy Katz 2003-01-03 16:16:50 UTC
*** Bug 81017 has been marked as a duplicate of this bug. ***

Comment 11 Jeremy Katz 2003-02-14 14:17:40 UTC
*** Bug 84303 has been marked as a duplicate of this bug. ***

Comment 12 Jeremy Katz 2003-02-17 21:14:01 UTC
*** Bug 84375 has been marked as a duplicate of this bug. ***

Comment 13 Jeremy Katz 2003-02-25 03:32:46 UTC
*** Bug 85051 has been marked as a duplicate of this bug. ***

Comment 14 Jeremy Katz 2003-03-13 21:47:14 UTC
*** Bug 86030 has been marked as a duplicate of this bug. ***

Comment 15 Jeremy Katz 2003-03-20 02:39:50 UTC
*** Bug 86329 has been marked as a duplicate of this bug. ***

Comment 17 John Thacker 2006-04-22 04:16:52 UTC
RH 8 is unsupported.  Also, s-c-p has been replaced by pirut.  Long fixed.  Closing.


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