diff options
author | Mike Fulbright <msf@redhat.com> | 2003-05-05 19:12:37 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2003-05-05 19:12:37 +0000 |
commit | bae30e78d558479a1b3dfca23c2020abcfcd3bc2 (patch) | |
tree | 75ba331f27bad9dc3cd68a8bc51ef2cfbdcdaf12 /image.py | |
parent | 22b1edcb2e46cfcba62710791a8c59cf8b042479 (diff) | |
download | anaconda-bae30e78d558479a1b3dfca23c2020abcfcd3bc2.tar.gz anaconda-bae30e78d558479a1b3dfca23c2020abcfcd3bc2.tar.xz anaconda-bae30e78d558479a1b3dfca23c2020abcfcd3bc2.zip |
show ALL missing images, not just the first one.
Diffstat (limited to 'image.py')
-rw-r--r-- | image.py | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -15,6 +15,7 @@ from comps import ComponentSet, HeaderListFromFile from installmethod import InstallMethod, FileCopyException import iutil import os +import sys import isys import time import stat @@ -42,8 +43,27 @@ class ImageInstallMethod(InstallMethod): def readHeaders(self): if not os.access(self.tree + "/RedHat/base/hdlist", os.R_OK): raise FileCopyException - return HeaderListFromFile(self.tree + "/RedHat/base/hdlist") + hl = HeaderListFromFile(self.tree + "/RedHat/base/hdlist") + + # Make sure all of the correct CD images are available + missing_images = [] + for h in hl.values(): + if not self.discImages.has_key(h[1000002]): + if h[1000002] not in missing_images: + missing_images.append(h[1000002]) + + if len(missing_images) > 0: + missing_images.sort() + missing_string = "" + for missing in missing_images: + missing_string += "\t\t\tCD #%d\n" % (missing,) + + self.messageWindow(_("Error"), + _("The following ISO images are missing which are required for the install:\n\n%s\nThe system will now reboot.") % missing_string) + sys.exit(0) + return hl + def mergeFullHeaders(self, hdlist): if not os.access(self.tree + "/RedHat/base/hdlist2", os.R_OK): raise FileCopyException @@ -391,7 +411,6 @@ def findIsoImages(path, messageWindow): "probably fail), or Cancel to exit the " "installer (RECOMMENDED). " % file, type = "okcancel") if rc: - import sys sys.exit(0) discImages[num] = file @@ -444,6 +463,7 @@ class NfsIsoInstallMethod(NfsInstallMethod): pass def __init__(self, tree, messageWindow, rootPath): + self.messageWindow = messageWindow self.imageMounted = None self.isoPath = tree |