summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-07-05 19:53:33 +0000
committerMatt Wilson <msw@redhat.com>2000-07-05 19:53:33 +0000
commite453b18cf329624c65cb5e8ce056f7de3b2a8f12 (patch)
treeac151e15c3c8a337092bce774bb118740fc1361c /image.py
parentb3d6c87e2ac6212a3dfc79fde59cdf00d84a60ab (diff)
downloadanaconda-e453b18cf329624c65cb5e8ce056f7de3b2a8f12.tar.gz
anaconda-e453b18cf329624c65cb5e8ce056f7de3b2a8f12.tar.xz
anaconda-e453b18cf329624c65cb5e8ce056f7de3b2a8f12.zip
patch from jj to only copy the filesystem if we need to switch disks
Diffstat (limited to 'image.py')
-rw-r--r--image.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/image.py b/image.py
index 5df6ef9d4..94fdfb31b 100644
--- a/image.py
+++ b/image.py
@@ -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)