[7.3] patch: instPath,fsset,diskset cleanup (PART 2)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here's the rest of the patch...


diff -u anaconda/packages.py:1.1.1.1 anaconda/packages.py:1.1.1.1.4.1
--- anaconda/packages.py:1.1.1.1	Thu Aug 22 17:21:28 2002
+++ anaconda/packages.py	Fri Sep 13 20:29:09 2002
@@ -46,24 +46,24 @@
         sys.exit(0)
     return DISPATCH_FORWARD
 
-def doPostAction(id, instPath):
-    id.instClass.postAction(instPath, flags.serial)        
+def doPostAction(id):
+    id.instClass.postAction(id.instPath, flags.serial)        
 
-def writeConfiguration(id, instPath):
+def writeConfiguration(id):
     log("Writing main configuration")
     if not flags.test:
-        id.write(instPath)
+        id.write()
 
-def writeKSConfiguration(id, instPath):
+def writeKSConfiguration(id):
     log("Writing autokickstart file")
     if not flags.test:
-	fn = instPath + "/root/anaconda-ks.cfg"
+	fn = id.instPath + "/root/anaconda-ks.cfg"
     else:
 	fn = "/tmp/anaconda-ks.cfg"
 
     id.writeKS(fn)
 
-def writeXConfiguration(id, instPath):
+def writeXConfiguration(id):
     if flags.test:
         return
 
@@ -76,24 +76,24 @@
 
     log("Writing X configuration")
     if not flags.test:
-        fn = instPath
+        fn = id.instPath
 
-        if os.access (instPath + "/etc/X11/X", os.R_OK):
-            os.rename (instPath + "/etc/X11/X",
-                       instPath + "/etc/X11/X.rpmsave")
+        if os.access (id.instPath + "/etc/X11/X", os.R_OK):
+            os.rename (id.instPath + "/etc/X11/X",
+                       id.instPath + "/etc/X11/X.rpmsave")
 
         try:
-            os.unlink (instPath + "/etc/X11/X")
+            os.unlink (id.instPath + "/etc/X11/X")
         except OSError:
             pass
             
         os.symlink ("../../usr/X11R6/bin/" + xserver,
-			    instPath + "/etc/X11/X")
+			    id.instPath + "/etc/X11/X")
     else:
         fn = "/tmp/"
 
     id.xconfig.write(fn+"/etc/X11")
-    id.desktop.write(instPath)
+    id.desktop.write(id.instPath)
 
 def readPackages(intf, method, id):
     if (not id.hdList):
@@ -113,7 +113,7 @@
 
 	id.comps.updateSelections()
 
-def handleX11Packages(dir, intf, disp, id, instPath):
+def handleX11Packages(dir, intf, disp, id):
 
     if dir == DISPATCH_BACK:
         return
@@ -150,14 +150,14 @@
         id.desktop.setDefaultRunLevel(5)
 
 
-def checkDependencies(dir, intf, disp, id, instPath):
+def checkDependencies(dir, intf, disp, id):
     if dir == DISPATCH_BACK:
 	return
 
     win = intf.waitWindow(_("Dependency Check"),
       _("Checking dependencies in packages selected for installation..."))
 
-    id.dependencies = id.comps.verifyDeps(instPath, id.upgrade.get())
+    id.dependencies = id.comps.verifyDeps(id.instPath, id.upgrade.get())
 
     win.pop()
 
@@ -352,19 +352,19 @@
     def __init__(self, f):
 	self.f = f
 
-def doMigrateFilesystems(dir, thefsset, diskset, upgrade, instPath):
+def doMigrateFilesystems(dir, thefsset, diskset, upgrade):
     if dir == DISPATCH_BACK:
         return DISPATCH_NOOP
 
     if thefsset.haveMigratedFilesystems():
         return DISPATCH_NOOP
     
-    thefsset.migrateFilesystems (instPath)
+    thefsset.migrateFilesystems ()
     
 
-def turnOnFilesystems(dir, thefsset, diskset, upgrade, instPath):
+def turnOnFilesystems(dir, thefsset, diskset, upgrade):
     if dir == DISPATCH_BACK:
-	thefsset.umountFilesystems(instPath)
+	thefsset.umountFilesystems()
 	return
 
     if flags.setupFilesystems:
@@ -372,13 +372,13 @@
             thefsset.setActive(diskset)
             if not thefsset.isActive():
                 diskset.savePartitions ()
-            thefsset.checkBadblocks(instPath)
-            thefsset.formatSwap(instPath)
-            thefsset.turnOnSwap(instPath)
-	    thefsset.makeFilesystems (instPath)
-            thefsset.mountFilesystems (instPath)
+            thefsset.checkBadblocks()
+            thefsset.formatSwap()
+            thefsset.turnOnSwap()
+	    thefsset.makeFilesystems ()
+            thefsset.mountFilesystems ()
 
-def doPreInstall(method, id, intf, instPath, dir):
+def doPreInstall(method, id, intf, dir):
     if flags.test:
 	return
 
@@ -480,18 +480,18 @@
     if upgrade:
 	# An old mtab can cause confusion (esp if loop devices are
 	# in it)
-	f = open(instPath + "/etc/mtab", "w+")
+	f = open(id.instPath + "/etc/mtab", "w+")
 	f.close()
 
-    if method.systemMounted (id.fsset, instPath, id.hdList.selected()):
-	id.fsset.umountFilesystems(instPath)
+    if method.systemMounted (id.fsset, id.hdList.selected()):
+	id.fsset.umountFilesystems()
 	return DISPATCH_BACK
 
     for i in ( '/var', '/var/lib', '/var/lib/rpm', '/tmp', '/dev', '/etc',
 	       '/etc/sysconfig', '/etc/sysconfig/network-scripts',
 	       '/etc/X11', '/root' ):
 	try:
-	    os.mkdir(instPath + i)
+	    os.mkdir(id.instPath + i)
 	except os.error, (errno, msg):
             #self.intf.messageWindow("Error",
             #                        "Error making directory %s: "
@@ -500,17 +500,17 @@
 
     # write out the fstab
     if not upgrade:
-        id.fsset.write(instPath)
+        id.fsset.write()
         # rootpath mode doesn't have this file around
         if os.access("/tmp/modules.conf", os.R_OK):
             iutil.copyFile("/tmp/modules.conf", 
-                           instPath + "/etc/modules.conf")
+                           id.instPath + "/etc/modules.conf")
 #    delay writing migrate adjusted fstab till later, in case
 #    rpm transaction set determines they don't have enough space to upgrade
 #    else:
-#        id.fsset.migratewrite(instPath)
+#        id.fsset.migratewrite()
 
-def doInstall(method, id, intf, instPath):
+def doInstall(method, id, intf):
     if flags.test:
 	return
 
@@ -518,8 +518,8 @@
     import whiteout
     
     upgrade = id.upgrade.get()
-    db = rpm.opendb(1, instPath)
-    ts = rpm.TransactionSet(instPath, db)
+    db = rpm.opendb(1, id.instPath)
+    ts = rpm.TransactionSet(id.instPath, db)
 
     total = 0
     totalSize = 0
@@ -558,19 +558,19 @@
     else:
 	logname = '/root/install.log'
 
-    instLogName = instPath + logname
+    instLogName = id.instPath + logname
     try:
 	iutil.rmrf (instLogName)
     except OSError:
 	pass
 
     instLog = open(instLogName, "w+")
-    syslogname = "%s%s.syslog" % (instPath, logname)
+    syslogname = "%s%s.syslog" % (id.instPath, logname)
     try:
         iutil.rmrf (syslogname)
     except OSError:
         pass
-    syslog.start (instPath, syslogname)
+    syslog.start (id.instPath, syslogname)
 
     if upgrade:
         instLog.write(_("Upgrading %s packages\n\n") % (i))        
@@ -598,7 +598,7 @@
 
     # write out migrate adjusted fstab so kernel RPM can get initrd right
     if upgrade:
-        id.fsset.migratewrite(instPath)
+        id.fsset.migratewrite()
     if id.upgradeDeps:
         instLog.write(_("\n\nThe following packages were automatically\n"
                         "selected to be installed:"
@@ -617,7 +617,7 @@
 
         # restore old fstab if we did anything for migrating
         if upgrade:
-            id.fsset.restoreMigratedFstab(instPath)
+            id.fsset.restoreMigratedFstab()
         
 	spaceneeded = {}
 	nodeneeded = {}
@@ -717,7 +717,7 @@
 
     id.instProgress = None
 
-def doPostInstall(method, id, intf, instPath):
+def doPostInstall(method, id, intf):
     if flags.test:
 	return
     
@@ -732,21 +732,21 @@
     else:
 	logname = '/root/install.log'
 
-    instLogName = instPath + logname
+    instLogName = id.instPath + logname
     instLog = open(instLogName, "a")
     
     try:
 	if not upgrade:
 	    w.set(1)
 
-	    copyExtraModules(instPath, id.comps, id.extraModules)
+	    copyExtraModules(id.instPath, id.comps, id.extraModules)
 
 	    w.set(2)
 
 	    # pcmcia is supported only on i386 at the moment
 	    if arch == "i386":
 		pcmcia.createPcmciaConfig(
-			instPath + "/etc/sysconfig/pcmcia")
+			id.instPath + "/etc/sysconfig/pcmcia")
 		       
 	    w.set(3)
 
@@ -779,7 +779,7 @@
 	    if arch != "s390" and arch != "s390x":
 		    unmountUSB = 0
 		    try:
-			isys.mount('/usbdevfs', instPath+'/proc/bus/usb', 'usbdevfs')
+			isys.mount('/usbdevfs', id.instPath+'/proc/bus/usb', 'usbdevfs')
 			unmountUSB = 1
 		    except:
 			log("Mount of /proc/bus/usb failed")
@@ -788,7 +788,7 @@
 			
 		    argv = [ "/usr/sbin/kudzu", "-q" ]
 		    devnull = os.open("/dev/null", os.O_RDWR)
-		    iutil.execWithRedirect(argv[0], argv, root = instPath,
+		    iutil.execWithRedirect(argv[0], argv, root = id.instPath,
 					   stdout = devnull)
 		    # turn it back on            
 		    if mousedev:
@@ -802,36 +802,36 @@
 			    pass
 
 		    if unmountUSB:
-			isys.umount(instPath + '/proc/bus/usb', removeDir = 0)
+			isys.umount(id.instPath + '/proc/bus/usb', removeDir = 0)
 
 	w.set(4)
 
 	if upgrade:
 	    # move the rebuilt db into place.
 	    try:
-		iutil.rmrf (instPath + "/var/lib/rpm.rpmsave")
+		iutil.rmrf (id.instPath + "/var/lib/rpm.rpmsave")
 	    except OSError:
 		pass
             try:
-                os.rename (instPath + "/var/lib/rpm",
-                           instPath + "/var/lib/rpm.rpmsave")
+                os.rename (id.instPath + "/var/lib/rpm",
+                           id.instPath + "/var/lib/rpm.rpmsave")
             except OSError:
                 # XXX hack..., if the above move failed, we'll just stash it in
                 # a (hopefully) unique location. (#50339)
-                os.rename (instPath + "/var/lib/rpm",
-                           instPath + "/var/lib/rpm.rpmsave-%s" %
+                os.rename (id.instPath + "/var/lib/rpm",
+                           id.instPath + "/var/lib/rpm.rpmsave-%s" %
                            (str(int(time.time())),))
-            os.rename (instPath + id.dbpath,
-		       instPath + "/var/lib/rpm")
+            os.rename (id.instPath + id.dbpath,
+		       id.instPath + "/var/lib/rpm")
 
 	    # XXX - rpm 4.0.2 %post braindeadness support
 	    try:
-		os.unlink (instPath + "/etc/rpm/macros.db1")
+		os.unlink (id.instPath + "/etc/rpm/macros.db1")
 	    except OSError:
 		pass
 
 	    # needed for prior systems which were not xinetd based
-	    migrateXinetd(instPath, instLogName)
+	    migrateXinetd(id.instPath, instLogName)
 
         w.set(5)
 
diff -u anaconda/partitioning.py:1.1.1.1 anaconda/partitioning.py:1.1.1.1.4.1
--- anaconda/partitioning.py:1.1.1.1	Thu Aug 22 17:21:28 2002
+++ anaconda/partitioning.py	Fri Sep 13 20:29:09 2002
@@ -813,7 +813,7 @@
                "  raidmembers: %s" % (raidmem)
 
     # turn a partition request into a fsset entry
-    def toEntry(self, partitions):
+    def toEntry(self, partitions, chroot = '/'):
         if self.type == REQUEST_RAID:
             raidmems = []
             for member in self.raidmembers:
@@ -833,7 +833,8 @@
             mountpoint = self.mountpoint
 
         entry = fsset.FileSystemSetEntry(device, mountpoint, self.fstype,
-                                         origfsystem=self.origfstype)
+                                         origfsystem=self.origfstype,
+					 chroot=chroot)
         if self.format:
             entry.setFormat(self.format)
 
@@ -1243,9 +1244,15 @@
 class DiskSet:
     skippedDisks = []
     mdList = []
-    def __init__ (self):
+    def __init__ (self, fsset):
+	self.fsset = fsset
         self.disks = {}
 
+    def __del__ (self):
+	self.fsset.umountFilesystems()
+	self.stopAllRaid()
+	self.closeDevices()
+
     def startAllRaid(self):
         driveList = []
         origDriveList = self.driveList()
@@ -1786,7 +1793,7 @@
                            % (get_partition_name(part)))
     
     
-def partitioningComplete(bl, fsset, diskSet, partitions, intf, instPath, dir):
+def partitioningComplete(bl, fsset, diskSet, partitions, intf, dir):
     if dir == DISPATCH_BACK and fsset.isActive():
         rc = intf.messageWindow(_("Installation cannot continue."),
                                 _("The partitioning options you have chosen "
@@ -1806,7 +1813,7 @@
         if (not request.fstype or (request.fstype.isMountable()
                                    and not request.mountpoint)):
             continue
-        entry = request.toEntry(partitions)
+        entry = request.toEntry(partitions, chroot = fsset.chroot)
         fsset.add (entry)
     if iutil.memInstalled() > isys.EARLY_SWAP_RAM:
         return
@@ -1824,8 +1831,8 @@
     if rc:
         fsset.setActive(diskSet)
         diskSet.savePartitions ()
-        fsset.formatSwap(instPath)
-        fsset.turnOnSwap(instPath)
+        fsset.formatSwap()
+        fsset.turnOnSwap()
 
 def checkForSwapNoMatch(intf, diskset, partitions):
     for request in partitions.requests:
diff -u anaconda/rescue.py:1.1.1.1 anaconda/rescue.py:1.1.1.1.2.1
--- anaconda/rescue.py:1.1.1.1	Thu Aug 22 17:21:28 2002
+++ anaconda/rescue.py	Fri Sep 13 20:29:09 2002
@@ -118,7 +118,7 @@
     else:
         readOnly = 0
 
-    disks = upgrade.findExistingRoots(intf, id, instPath)
+    disks = upgrade.findExistingRoots(intf, id.diskset, id, instPath)
 
     if not disks:
 	root = None
@@ -151,8 +151,9 @@
     rootmounted = 0
     if root:
         try:
-	    fs = fsset.FileSystemSet()
-	    rc = upgrade.mountRootPartition(intf, root, fs, instPath,
+	    fs = fsset.FileSystemSet(chroot=instPath)
+	    rc = upgrade.mountRootPartition(intf, id.diskset, root, fs, 
+	                                    instPath,
                                             allowDirty = 1, warnDirty = 1,
                                             readOnly = readOnly)
 
diff -u anaconda/upgrade.py:1.1.1.1 anaconda/upgrade.py:1.1.1.1.2.2
--- anaconda/upgrade.py:1.1.1.1	Thu Aug 22 17:21:28 2002
+++ anaconda/upgrade.py	Fri Sep 13 20:46:50 2002
@@ -28,16 +28,15 @@
 from translate import _
 from constants import *
 
-def findRootParts(intf, id, dir, chroot):
+def findRootParts(intf, id, dir):
     if dir == DISPATCH_BACK:
         return
-    parts = findExistingRoots(intf, id, chroot)
+    parts = findExistingRoots(intf, id.diskset, id)
     id.upgradeRoot = parts
 
-def findExistingRoots(intf, id, chroot):
-    if not flags.setupFilesystems: return [(chroot, 'ext2')]
+def findExistingRoots(intf, diskset, id):
+    if not flags.setupFilesystems: return [(id.instPath, 'ext2')]
 
-    diskset = DiskSet()
     diskset.openDevices()
     
     win = intf.waitWindow(_("Searching"),
@@ -48,11 +47,10 @@
 
     return rootparts
 
-def mountRootPartition(intf, rootInfo, oldfsset, instPath, allowDirty = 0,
+def mountRootPartition(intf, diskset, rootInfo, theFsset, allowDirty = 0,
 		       raiseErrors = 0, warnDirty = 0, readOnly = 0):
     (root, rootFs) = rootInfo
 
-    diskset = DiskSet()
     diskset.openDevices()
     diskset.startAllRaid()
 
@@ -61,17 +59,15 @@
     else:
 	isys.mount(root, '/mnt/sysimage', rootFs)
 
-    oldfsset.reset()
-    newfsset = fsset.readFstab(instPath + '/etc/fstab')
-    for entry in newfsset.entries:
-        oldfsset.add(entry)
+    theFsset.reset()
+    theFsset.readFstab(theFsset.chroot + '/etc/fstab', diskset)
 
     if rootFs == "vfat":
 	unmountLoopbackRoot()
     else:
 	isys.umount('/mnt/sysimage')        
 
-    if not allowDirty and oldfsset.hasDirtyFilesystems():
+    if not allowDirty and theFsset.hasDirtyFilesystems():
         import sys
         diskset.stopAllRaid()
 	intf.messageWindow(_("Dirty Filesystems"),
@@ -80,7 +76,7 @@
 	      "installation, let the filesystems be checked, and "
 	      "shut down cleanly to upgrade."))
 	sys.exit(0)
-    elif warnDirty and oldfsset.hasDirtyFilesystems():
+    elif warnDirty and theFsset.hasDirtyFilesystems():
         rc = intf.messageWindow(_("Dirty Filesystems"),
                  _("One or more filesystems for your Linux system "
                    "was not unmounted cleanly.  Would you like to mount "
@@ -89,17 +85,17 @@
             return -1
 
     if flags.setupFilesystems:
-        oldfsset.mountFilesystems(instPath, readOnly = readOnly)
+        theFsset.mountFilesystems(readOnly = readOnly)
 
     # XXX we should properly support 'auto' at some point
-    if (not oldfsset.getEntryByMountPoint("/") or
-        not oldfsset.getEntryByMountPoint("/").fsystem or
-        not oldfsset.getEntryByMountPoint("/").fsystem.isMountable()):
+    if (not theFsset.getEntryByMountPoint("/") or
+        not theFsset.getEntryByMountPoint("/").fsystem or
+        not theFsset.getEntryByMountPoint("/").fsystem.isMountable()):
         raise RuntimeError, "/etc/fstab did not list a fstype for the root partition which we support"
 
 # returns None if no filesystem exist to migrate
-def upgradeMigrateFind(dispatch, thefsset):
-    migents = thefsset.getMigratableEntries()
+def upgradeMigrateFind(dispatch, theFsset):
+    migents = theFsset.getMigratableEntries()
     if not migents or len(migents) < 1:
         dispatch.skipStep("upgrademigratefs")
     else:
@@ -107,7 +103,7 @@
     
 
 # returns None if no more swap is needed
-def upgradeSwapSuggestion(dispatch, id, instPath):
+def upgradeSwapSuggestion(dispatch, id):
     # mem is in kb -- round it up to the nearest 4Mb
     mem = iutil.memInstalled(corrected = 0)
     rem = mem % 16384
@@ -146,7 +142,7 @@
             if entry.fsystem.getName() in fsset.getUsableLinuxFs():
                 if flags.setupFilesystems and not entry.isMounted():
                     continue
-                space = isys.pathSpaceAvailable(instPath + entry.mountpoint)
+                space = isys.pathSpaceAvailable(id.instPath + entry.mountpoint)
                 if space > 16:
                     info = (entry.mountpoint, entry.device.getDevice(), space)
                     fsList.append(info)
@@ -171,11 +167,12 @@
     except:
 	return 0
 
-def createSwapFile(instPath, theFsset, mntPoint, size):
-    fstabPath = instPath + "/etc/fstab"
+def createSwapFile(theFsset, mntPoint, size):
+    chroot = theFsset.chroot
+    fstabPath = chroot + "/etc/fstab"
     prefix = ""
     if theFsset.rootOnLoop():
-	instPath = "/mnt/loophost"
+	chroot = "/mnt/loophost"
 	prefix = "/initrd/loopfs"
 
     if mntPoint != "/":
@@ -189,7 +186,7 @@
             swapFileDict[entry.device.getName()] = 1
         
     count = 0
-    while (swapfileExists(instPath + file) or 
+    while (swapfileExists(chroot + file) or 
 	   swapFileDict.has_key(file)):
 	count = count + 1
 	tmpFile = "/SWAP-%d" % (count)
@@ -201,11 +198,12 @@
     device = SwapFileDevice(file)
     device.setSize(size)
     fsystem = fileSystemTypeGet("swap")
-    entry = FileSystemSetEntry(device, "swap", fsystem)
+    entry = FileSystemSetEntry(device, "swap", fsystem, 
+                               chroot = theFsset.chroot)
     entry.setFormat(1)
     theFsset.add(entry)
-    theFsset.formatEntry(entry, instPath)
-    theFsset.turnOnSwap(instPath)
+    theFsset.formatEntry(entry)
+    theFsset.turnOnSwap()
 
     # XXX generalize fstab modification
     f = open(fstabPath, "a")
@@ -214,12 +212,12 @@
     f.close()
 
 # XXX handle going backwards
-def upgradeMountFilesystems(intf, rootInfo, oldfsset, instPath):
+def upgradeMountFilesystems(intf, diskset, rootInfo, theFsset):
     # mount everything and turn on swap
-
+    chroot = theFsset.chroot
     if flags.setupFilesystems:
 	try:
-	    mountRootPartition(intf, rootInfo[0], oldfsset, instPath,
+	    mountRootPartition(intf, diskset, rootInfo[0], theFsset,
                                allowDirty = 0)
 	except SystemError, msg:
 	    intf.messageWindow(_("Mount failed"),
@@ -239,8 +237,8 @@
 		       '/boot', '/tmp', '/var/tmp' ]
 	badLinks = []
 	for n in checkLinks:
-	    if not os.path.islink(instPath + n): continue
-	    l = os.readlink(instPath + n)
+	    if not os.path.islink(chroot + n): continue
+	    l = os.readlink(chroot + n)
 	    if l[0] == '/':
 		badLinks.append(n)
 
@@ -254,23 +252,18 @@
 	    intf.messageWindow(("Absolute Symlinks"), message)
 	    sys.exit(0)
     else:
-        if not os.access (instPath + "/etc/fstab", os.R_OK):
+        if not os.access (chroot + "/etc/fstab", os.R_OK):
             rc = intf.messageWindow(_("Warning"),
                                     _("%s not found")
-                                    % (instPath + "/etc/fstab",),
+                                    % (chroot + "/etc/fstab",),
                                   type="ok")
             return DISPATCH_BACK
             
-	newfsset = fsset.readFstab(instPath + '/etc/fstab')
-        for entry in newfsset.entries:
-            oldfsset.add(entry)
+	theFsset.readFstab(chroot + '/etc/fstab', diskset)
         
-    if flags.setupFilesystems:
-        oldfsset.turnOnSwap(instPath)
-
 rebuildTime = None
 
-def upgradeFindPackages(intf, method, id, instPath, dir):
+def upgradeFindPackages(intf, method, id, dir):
     if dir == DISPATCH_BACK:
         return
     global rebuildTime
@@ -288,19 +281,19 @@
 
     # now, set the system clock so the timestamps will be right:
     if flags.setupFilesystems:
-        iutil.setClock(instPath)
+        iutil.setClock(id.instPath)
     
     # and rebuild the database so we can run the dependency problem
     # sets against the on disk db
 
-    rebuildpath = instPath + id.dbpath
+    rebuildpath = id.instPath + id.dbpath
 
     try:
         iutil.rmrf(rebuildpath)
     except:
         pass
 
-    rc = rpm.rebuilddb(instPath)
+    rc = rpm.rebuilddb(id.instPath)
     if rc:
         try:
             iutil.rmrf(rebuildpath)
@@ -316,7 +309,7 @@
     rpm.addMacro("_dbpath", id.dbpath)
     rpm.addMacro("_dbapi", "3")
     try:
-	packages = rpm.findUpgradeSet(id.hdList.hdlist, instPath)
+	packages = rpm.findUpgradeSet(id.hdList.hdlist, id.instPath)
     except rpm.error:
 	iutil.rmrf(rebuildpath)
 	win.pop()
@@ -339,7 +332,7 @@
 
     # open up the database to check dependencies and currently
     # installed packages
-    db = rpm.opendb(0, instPath)
+    db = rpm.opendb(0, id.instPath)
 
     i = db.match()
     h = i.next()
@@ -393,7 +386,7 @@
                 pass
             sys.exit(0)
 
-    if not os.access(instPath + "/etc/redhat-release", os.R_OK):
+    if not os.access(id.instPath + "/etc/redhat-release", os.R_OK):
         rc = intf.messageWindow(_("Warning"),
                                 _("This system does not have an "
                                   "/etc/redhat-release file.  It is possible "
@@ -412,8 +405,8 @@
     # during upgrade, make sure that we only install %lang colored files
     # for the languages selected to be supported.
     langs = ''
-    if os.access(instPath + "/etc/sysconfig/i18n", os.R_OK):
-        f = open(instPath + "/etc/sysconfig/i18n", 'r')
+    if os.access(id.instPath + "/etc/sysconfig/i18n", os.R_OK):
+        f = open(id.instPath + "/etc/sysconfig/i18n", 'r')
         for line in f.readlines():
             line = string.strip(line)
             parts = string.split(line, '=')
@@ -541,7 +534,7 @@
     del db
 
     # new package dependency fixup
-    deps = id.comps.verifyDeps(instPath, 1)
+    deps = id.comps.verifyDeps(id.instPath, 1)
     for (name, suggest) in deps:
         if suggest != _("no suggestion"):
             text = ("Upgrade Dependency: %s needs %s, "
diff -u anaconda/installclasses/reconfig.py:1.1.1.1 anaconda/installclasses/reconfig.py:1.1.1.1.4.1
--- anaconda/installclasses/reconfig.py:1.1.1.1	Thu Aug 22 17:21:29 2002
+++ anaconda/installclasses/reconfig.py	Fri Sep 13 20:29:10 2002
@@ -7,15 +7,15 @@
 
 class ReconfigInstallData(InstallData):
 
-    def write(self, instPath):
-        self.langSupport.write (instPath)
-        self.keyboard.write (instPath)
-        self.network.write (instPath)
-        self.auth.write (instPath)
-	self.firewall.write (instPath)
-	self.timezone.write (instPath)
-        self.rootPassword.write (instPath, self.auth)
-        self.accounts.write (instPath, self.auth)
+    def write(self):
+        self.langSupport.write (self.instPath)
+        self.keyboard.write (self.instPath)
+        self.network.write (self.instPath)
+        self.auth.write (self.instPath)
+	self.firewall.write (self.instPath)
+	self.timezone.write (self.instPath)
+        self.rootPassword.write (self.instPath, self.auth)
+        self.accounts.write (self.instPath, self.auth)
 
     def writeKS(self, file):
 	pass
diff -u anaconda/iw/examine_gui.py:1.1.1.1 anaconda/iw/examine_gui.py:1.1.1.1.4.1
--- anaconda/iw/examine_gui.py:1.1.1.1	Thu Aug 22 17:21:31 2002
+++ anaconda/iw/examine_gui.py	Fri Sep 13 20:29:10 2002
@@ -38,11 +38,10 @@
         return None
 
     #UpgradeExamineWindow tag = "upgrade"
-    def getScreen (self, dispatch, intf, id, chroot):
+    def getScreen (self, dispatch, intf, id):
         self.dispatch = dispatch
         self.intf = intf
         self.id = id
-        self.chroot = chroot
 
         self.parts = self.id.upgradeRoot
         
diff -u anaconda/iw/upgrade_swap_gui.py:1.1.1.1 anaconda/iw/upgrade_swap_gui.py:1.1.1.1.4.1
--- anaconda/iw/upgrade_swap_gui.py:1.1.1.1	Thu Aug 22 17:21:31 2002
+++ anaconda/iw/upgrade_swap_gui.py	Fri Sep 13 20:29:10 2002
@@ -62,7 +62,7 @@
 
         else:
             if flags.setupFilesystems:
-                upgrade.createSwapFile(self.instPath, self.fsset, mnt, val)
+                upgrade.createSwapFile(self.fsset, mnt, val)
             self.dispatch.skipStep("addswap", 1)
                 
         return None
@@ -73,10 +73,9 @@
     def clist_cb(self, clist, row, col, data):
         self.row = row
     
-    def getScreen (self, intf, fsset, instPath, swapInfo, dispatch):
+    def getScreen (self, intf, fsset, swapInfo, dispatch):
         self.neededSwap = 0
         self.fsset = fsset
-        self.instPath = instPath
         self.intf = intf
         self.dispatch = dispatch
         
diff -u anaconda/textw/upgrade_text.py:1.1.1.1 anaconda/textw/upgrade_text.py:1.1.1.1.2.1
--- anaconda/textw/upgrade_text.py:1.1.1.1	Thu Aug 22 17:21:36 2002
+++ anaconda/textw/upgrade_text.py	Fri Sep 13 20:29:11 2002
@@ -81,7 +81,7 @@
             return INSTALL_OK
 
 class UpgradeSwapWindow:
-    def __call__ (self, screen, intf, fsset, instPath, swapInfo, dispatch):
+    def __call__ (self, screen, intf, fsset, swapInfo, dispatch):
 	rc = swapInfo
 
 	(fsList, suggSize, suggMntPoint) = rc
@@ -177,15 +177,15 @@
 		else:
 		    screen.popWindow()
                     if flags.setupFilesystems:
-                        upgrade.createSwapFile(instPath, fsset, mnt, val)
+                        upgrade.createSwapFile(fsset, mnt, val)
                     dispatch.skipStep("addswap", 1)
 		    return INSTALL_OK
 
 	raise ValueError
 	
 class UpgradeExamineWindow:
-    def __call__ (self, screen, dispatch, intf, id, chroot):
-        self.parts = upgrade.findExistingRoots(intf, id, chroot)
+    def __call__ (self, screen, dispatch, intf, id):
+        self.parts = upgrade.findExistingRoots(intf, id.diskset, id)
         parts = id.upgradeRoot
 
         if not parts:
@@ -242,7 +242,7 @@
         return INSTALL_OK
 
 class CustomizeUpgradeWindow:
-    def __call__ (self, screen, dispatch, intf, id, chroot):
+    def __call__ (self, screen, dispatch, intf, id):
         rc = ButtonChoiceWindow (screen, _("Customize Packages to Upgrade"),
                                  _("The packages you have installed, "
                                    "and any other packages which are "





[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux