diff options
author | Matt Wilson <msw@redhat.com> | 2000-07-05 19:53:33 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-07-05 19:53:33 +0000 |
commit | e453b18cf329624c65cb5e8ce056f7de3b2a8f12 (patch) | |
tree | ac151e15c3c8a337092bce774bb118740fc1361c | |
parent | b3d6c87e2ac6212a3dfc79fde59cdf00d84a60ab (diff) | |
download | anaconda-e453b18cf329624c65cb5e8ce056f7de3b2a8f12.tar.gz anaconda-e453b18cf329624c65cb5e8ce056f7de3b2a8f12.tar.xz anaconda-e453b18cf329624c65cb5e8ce056f7de3b2a8f12.zip |
patch from jj to only copy the filesystem if we need to switch disks
-rw-r--r-- | harddrive.py | 2 | ||||
-rw-r--r-- | image.py | 18 | ||||
-rw-r--r-- | installmethod.py | 2 | ||||
-rw-r--r-- | todo.py | 2 |
4 files changed, 17 insertions, 7 deletions
diff --git a/harddrive.py b/harddrive.py index ddbe609d5..73cd1d6f5 100644 --- a/harddrive.py +++ b/harddrive.py @@ -65,7 +65,7 @@ class HardDriveInstallMethod(InstallMethod): self.umountMedia() return HeaderList(hl) - def systemMounted(self, fstab, mntPoint): + def systemMounted(self, fstab, mntPoint, selected): self.mountMedia() def filesDone(self): @@ -26,7 +26,14 @@ class ImageInstallMethod(InstallMethod): class CdromInstallMethod(ImageInstallMethod): - def systemMounted(self, fstab, mntPoint): + def systemMounted(self, fstab, mntPoint, selected): + changeloop=0 + for p in selected: + if p[1000002] > 1: + changeloop=1 + break + if changeloop == 0: + return self.mntPoint = mntPoint target = "%s/rhinstall-stage2.img" % mntPoint iutil.copyFile("%s/RedHat/base/stage2.img" % self.tree, target, @@ -69,9 +76,12 @@ class CdromInstallMethod(ImageInstallMethod): return self.tree + "/RedHat/RPMS/" + h[1000000] def filesDone(self): - # this isn't the exact right place, but it's close enough - target = "%s/rhinstall-stage2.img" % self.mntPoint - os.unlink(target) + try: + # this isn't the exact right place, but it's close enough + target = "%s/rhinstall-stage2.img" % self.mntPoint + os.unlink(target) + except: + pass isys.umount("/mnt/source") isys.ejectCdrom(self.device) diff --git a/installmethod.py b/installmethod.py index b304c5d71..a162b6bc3 100644 --- a/installmethod.py +++ b/installmethod.py @@ -15,7 +15,7 @@ class InstallMethod: def readHeaders(self): pass - def systemMounted(self, fstab, mntPoint): + def systemMounted(self, fstab, mntPoint, selected): pass def filesDone(self): @@ -1375,7 +1375,7 @@ class ToDo: # # flag this so we only do it once. # self.dbpath = None - self.method.systemMounted (self.fstab, self.instPath) + self.method.systemMounted (self.fstab, self.instPath, self.hdList.selected()) if not self.installSystem: return |