summaryrefslogtreecommitdiffstats
path: root/image.py
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2003-09-12 21:20:41 +0000
committerMike Fulbright <msf@redhat.com>2003-09-12 21:20:41 +0000
commit114ca03be7dab9ce579531a318be02ea7562fb84 (patch)
tree4bbc019a347c37bffb43ad7f4f86c802b4acb405 /image.py
parent3670d962a6f7da0f8b9d6f5cb22e7c2a001a48c5 (diff)
downloadanaconda-114ca03be7dab9ce579531a318be02ea7562fb84.tar.gz
anaconda-114ca03be7dab9ce579531a318be02ea7562fb84.tar.xz
anaconda-114ca03be7dab9ce579531a318be02ea7562fb84.zip
add notification right before install/upgrade starts on how many CDs will be required so user can abort if they didnt burn them all
Diffstat (limited to 'image.py')
-rw-r--r--image.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/image.py b/image.py
index af45a20ca..22c95c19a 100644
--- a/image.py
+++ b/image.py
@@ -22,6 +22,8 @@ import stat
import kudzu
import string
import shutil
+import product
+
from constants import *
from rhpl.log import log
@@ -34,6 +36,43 @@ if os.uname()[4] == "s390x":
else:
_arch = iutil.getArch()
+# given groupset containing information about selected packages, use
+# the disc number info in the headers to come up with message describing
+# the required CDs
+#
+# dialog returns a value of 0 if user selected to abort install
+def presentRequiredMediaMessage(intf, grpset):
+ reqcds = []
+ for hdr in grpset.hdrlist.values():
+ if not hdr.isSelected():
+ continue
+ elif hdr[1000002] not in reqcds:
+ reqcds.append(hdr[1000002])
+ else:
+ continue
+
+ # if only one CD required no need to pop up a message
+ if len(reqcds) < 2:
+ return
+
+ reqcds.sort()
+ reqcdstr = ""
+ for cdnum in reqcds:
+ reqcdstr += "\t\t%s %s CD #%d\n" % (product.productName, product.productVersion, cdnum,)
+
+ return intf.messageWindow( _("Required Install Media"),
+ _("The software you have selected to "
+ "install will require the following CDs:\n\n"
+ "%s\nPlease "
+ "have these ready before proceeding with "
+ "the installation. If you need to abort "
+ "the installation and reboot please "
+ "select \"Reboot\".") % (reqcdstr,),
+ type="custom", custom_icon="warning",
+ custom_buttons=[_("_Reboot"), _("_Continue")])
+
+
+
class ImageInstallMethod(InstallMethod):
def readCompsViaMethod(self, hdlist):