summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2000-08-08 18:53:59 +0000
committerErik Troan <ewt@redhat.com>2000-08-08 18:53:59 +0000
commitffd483c53fa77d5f2138ba527b3c3bdbecb09e05 (patch)
tree957bab69ea44c18bc1266af4d03ff8e0d8788496
parent5fefde72bb02bacaa2cca99af2e64fad1e5358cf (diff)
downloadanaconda-ffd483c53fa77d5f2138ba527b3c3bdbecb09e05.tar.gz
anaconda-ffd483c53fa77d5f2138ba527b3c3bdbecb09e05.tar.xz
anaconda-ffd483c53fa77d5f2138ba527b3c3bdbecb09e05.zip
handle running out of space when copying stage2.img a bit more maturally
-rw-r--r--image.py17
-rw-r--r--iutil.py28
-rw-r--r--todo.py16
3 files changed, 43 insertions, 18 deletions
diff --git a/image.py b/image.py
index debbd9e07..b9f60600d 100644
--- a/image.py
+++ b/image.py
@@ -39,10 +39,19 @@ class CdromInstallMethod(ImageInstallMethod):
self.loopbackFile = mntPoint + fstab.filesystemSpace()[0][0] + \
"/rhinstall-stage2.img"
- iutil.copyFile("%s/RedHat/base/stage2.img" % self.tree,
- self.loopbackFile,
- (self.progressWindow, _("Copying File"),
- _("Transferring install image to hard drive...")))
+ try:
+ iutil.copyFile("%s/RedHat/base/stage2.img" % self.tree,
+ self.loopbackFile,
+ (self.progressWindow, _("Copying File"),
+ _("Transferring install image to hard drive...")))
+ except:
+ self.messageWindow(_("Error"),
+ _("An error occured transferring the install image "
+ "to your hard drive. You are probably out of disk "
+ "space."))
+ os.unlink(self.loopbackFile)
+ return 1
+
isys.makeDevInode("loop0", "/tmp/loop")
isys.lochangefd("/tmp/loop", self.loopbackFile)
diff --git a/iutil.py b/iutil.py
index 7dbd47841..1f7602d57 100644
--- a/iutil.py
+++ b/iutil.py
@@ -138,20 +138,22 @@ def copyFile(source, to, pw = None):
total = os.path.getsize(source)
win = fn(title, text, total)
- count = os.read(f, 262144)
- total = 0
- while (count):
- os.write(t, count)
- total = total + len(count)
- if pw:
- win.set(total)
- count = os.read(f, 16384)
-
- os.close(f)
- os.close(t)
+ try:
+ count = os.read(f, 262144)
+ total = 0
+ while (count):
+ os.write(t, count)
+
+ total = total + len(count)
+ if pw:
+ win.set(total)
+ count = os.read(f, 16384)
+ finally:
+ os.close(f)
+ os.close(t)
- if pw:
- win.pop()
+ if pw:
+ win.pop()
def memInstalled():
f = open("/proc/meminfo", "r")
diff --git a/todo.py b/todo.py
index f00829dbe..07c16914d 100644
--- a/todo.py
+++ b/todo.py
@@ -1300,6 +1300,12 @@ class ToDo:
self.hdList['kernel-smp'][rpm.RPMTAG_RELEASE] + "smp")
kernelVersions.append(version)
+ if (self.hdList.has_key('kernel-enterprise') and
+ self.hdList['kernel-enterprise'].selected):
+ version = (self.hdList['kernel-enterprise'][rpm.RPMTAG_VERSION] + "-" +
+ self.hdList['kernel-enterprise'][rpm.RPMTAG_RELEASE] + "smp")
+ kernelVersions.append(version)
+
version = (self.hdList['kernel'][rpm.RPMTAG_VERSION] + "-" +
self.hdList['kernel'][rpm.RPMTAG_RELEASE])
kernelVersions.append(version)
@@ -1337,6 +1343,12 @@ class ToDo:
self.hdList['kernel-smp'][rpm.RPMTAG_RELEASE] + "smp")
kernelVersions.append(version)
+ if (self.hdList.has_key('kernel-enterprise') and
+ self.hdList['kernel-enterprise'].selected):
+ version = (self.hdList['kernel-enterprise'][rpm.RPMTAG_VERSION] + "-" +
+ self.hdList['kernel-enterprise'][rpm.RPMTAG_RELEASE] + "smp")
+ kernelVersions.append(version)
+
version = (self.hdList['kernel'][rpm.RPMTAG_VERSION] + "-" +
self.hdList['kernel'][rpm.RPMTAG_RELEASE])
kernelVersions.append(version)
@@ -1449,7 +1461,9 @@ class ToDo:
f = open(self.instPath + "/etc/mtab", "w+")
f.close()
- self.method.systemMounted (self.fstab, self.instPath, self.hdList.selected())
+ if self.method.systemMounted (self.fstab, self.instPath, self.hdList.selected()):
+ self.fstab.umountFilesystems(self.instPath)
+ return 1
if not self.installSystem:
return