Bug 7851

Summary: Error in the installer Python script called 'harddrive.py'
Product: [Retired] Red Hat Linux Reporter: Tasuki <tasuki.y2k>
Component: installerAssignee: Jay Turner <jturner>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6.1CC: srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-04-14 20:43:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tasuki 1999-12-16 20:03:25 UTC
I have found what appears to be an error in the 'harddrive.py' script of the
installer component. I have no experience of Python so I cannot verify the
error. However, it does not seem consistent with the rest of the script.

Context
---------

I am attempting to install RH 6.1 onto an NT workstation with 2 drives. First
IDE drive /dev/hda has two partitions one 4GB NTFS partition with NT
Workstation 4.0 and one 2GB FAT16 partition containing an exact duplicate of
http://sunsite.org.uk/pub/unix/Linux/redhat/current/i386/. Even with the new
updates-RHEA-1999-045.img and boot-RHEA-1999-044.img files, I end up
with the same exception in the graphical installer utility. This exception occurs
at the same place: just after the "Authentication Configuration" screen and
when undoubtedly I am supposed to get to the "Select Packages to Install"
section. I will not list the full text of the exception here (since there is no
simple way to copy the text of the exception over to the FAT16 partition).
However, I will list the section of the script file, 'harddrive.py' mentioned at
the bottom of the exception which I suspect contains the error.

Detail
-------

After pressing F2 at the exception, I listed the following
file: 'cd /tmp/lib/python1.5/site-packages; cat harddrive.py'.

Possible error at line 31 (shows as exception error on line 32 in the installer):
START OF CODE BLOCK[exact copy] (error shown by -->)

    def readHeaders(self):
	isys.makeDevInode(self.device, '/tmp/' + self.device)
	isys.mount('/tmp/' + self.device, "/tmp/hdimage",
		   fstype = self.fstype);
	hl = []
-->	path = "/tmp/hdimage" + self.path + "/RedHat/RPMS"
	for n in os.listdir(path):
# no gurantee on suffix - do a copy onto msdos filesytem from
# linux and you don't get .rpm
#	    if (n[len(n) - 4:] == '.rpm'):
            fd = os.open(path + "/" + n, 0)
            try:
                (h, isSource) = rpm.headerFromPackage(fd)
            except:
                continue
            self.fnames[h] = n
            hl.append(h)
            os.close(fd)

	isys.umount("/tmp/hdimage")
	return HeaderList(hl)

END OF CODEBLOCK[exact copy]

At all other places in script file 'harddrive.py' the identifier 'self.path' is always
prefixed with a forward slash '/' just before it is used. This is the only place
where a forward slash is not used and thus I believe the concatenation on
line 31 causes an incorrect 'path' to be used as part of the 'os.listdir(path)'
method call? The spelling of 'filesystem' and 'guarantee' are also suspicious.

Please verify and correct me or the script. I really want to install RH 6.1. It
looks very different to RH 5.0. Thank you.

Comment 1 Jay Turner 2000-02-22 19:13:59 UTC
Please submit the details of the python exception.  This is the only way that we
are able to know what is happening with your system.

Comment 2 Erik Troan 2000-04-14 20:43:59 UTC
Closed due to no response.