Bug 74877 - Autorun on 8.0 installation cd crashes
Autorun on 8.0 installation cd crashes
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: redhat-config-packages (Show other bugs)
8.0
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jeremy Katz
Brock Organ
:
: 77343 77904 81017 84303 84375 85051 86030 86329 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-02 11:03 EDT by David Hawkins
Modified: 2007-04-18 12:47 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-04-22 00:16:52 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)

  None (edit)
Description David Hawkins 2002-10-02 11:03:36 EDT
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 11:11:54 EDT
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 14:36:50 EDT
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 09:05:40 EDT
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 16:18:46 EDT
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 16:23:18 EDT
(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 16:53:34 EDT
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 17:11:57 EDT
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 13:11:36 EST
*** Bug 77343 has been marked as a duplicate of this bug. ***
Comment 9 Jeremy Katz 2002-11-14 19:35:11 EST
*** Bug 77904 has been marked as a duplicate of this bug. ***
Comment 10 Jeremy Katz 2003-01-03 11:16:50 EST
*** Bug 81017 has been marked as a duplicate of this bug. ***
Comment 11 Jeremy Katz 2003-02-14 09:17:40 EST
*** Bug 84303 has been marked as a duplicate of this bug. ***
Comment 12 Jeremy Katz 2003-02-17 16:14:01 EST
*** Bug 84375 has been marked as a duplicate of this bug. ***
Comment 13 Jeremy Katz 2003-02-24 22:32:46 EST
*** Bug 85051 has been marked as a duplicate of this bug. ***
Comment 14 Jeremy Katz 2003-03-13 16:47:14 EST
*** Bug 86030 has been marked as a duplicate of this bug. ***
Comment 15 Jeremy Katz 2003-03-19 21:39:50 EST
*** Bug 86329 has been marked as a duplicate of this bug. ***
Comment 17 John Thacker 2006-04-22 00:16:52 EDT
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.