summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-05-05 19:12:37 +0000
committerMike Fulbright <msf@redhat.com>2003-05-05 19:12:37 +0000
commitbae30e78d558479a1b3dfca23c2020abcfcd3bc2 (patch)
tree75ba331f27bad9dc3cd68a8bc51ef2cfbdcdaf12 /image.py
parent22b1edcb2e46cfcba62710791a8c59cf8b042479 (diff)
downloadanaconda-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.py24
1 files changed, 22 insertions, 2 deletions
diff --git a/image.py b/image.py
index 8807573d0..b57917c8c 100644
--- a/image.py
+++ b/image.py
@@ -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