diff options
author | Jeremy Katz <katzj@redhat.com> | 2007-03-28 22:05:23 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2007-03-28 22:05:23 +0000 |
commit | 3a2ab111dadebb0b987d9a3afde475aefe252305 (patch) | |
tree | dbdd181c541ac32a24907b774d6f26bf4820d2bc /livecd.py | |
parent | 0cb2b91246aa69aab979d020bf37761a95e738f2 (diff) | |
download | anaconda-3a2ab111dadebb0b987d9a3afde475aefe252305.tar.gz anaconda-3a2ab111dadebb0b987d9a3afde475aefe252305.tar.xz anaconda-3a2ab111dadebb0b987d9a3afde475aefe252305.zip |
2007-03-28 Jeremy Katz <katzj@redhat.com>
* livecd.py (LiveCDCopyBackend.doRepoSetup): Check that we have
sufficient disk space for the os.img. (#230943)
* backend.py (doRepoSetup): If repo setup fails, go back.
Diffstat (limited to 'livecd.py')
-rw-r--r-- | livecd.py | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -284,6 +284,31 @@ class LiveCDCopyBackend(backend.AnacondaBackend): %(productName,), type = "custom", custom_icon="error", custom_buttons=[_("Exit installer")]) + isys.umount("/mnt/installer/squashed") + isys.unlosetup("/dev/loop4") + sys.exit(1) + + # ensure there's enough space on the rootfs + # FIXME: really, this should be in the general sanity checking, but + # trying to weave that in is a little tricky at present. + ossize = os.stat("/mnt/installer/squashed/os.img")[stat.ST_SIZE] / 1024.0 / 1024.0 + slash = anaconda.id.partitions.getRequestByMountPoint("/") + if slash and \ + slash.getActualSize(anaconda.id.partitions, anaconda.id.diskset) < ossize: + rc = anaconda.intf.messageWindow(_("Error"), + ("The root filesystem you created is " + "not large enough for this live " + "image."), type = "custom", + custom_icon = "error", + custom_buttons=[_("Back"), + _("Exit installer")]) + if rc == 0: + isys.umount("/mnt/installer/squashed") + isys.unlosetup("/dev/loop4") + return DISPATCH_BACK + else: + sys.exit(1) + # package/group selection doesn't apply for this backend def groupExists(self, group): |