summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--harddrive.py2
-rw-r--r--image.py18
-rw-r--r--installmethod.py2
-rw-r--r--todo.py2
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):
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)
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):
diff --git a/todo.py b/todo.py
index dab15dc24..b70e8676a 100644
--- a/todo.py
+++ b/todo.py
@@ -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