FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Directory

 
 
LinkBack Thread Tools
 
Old 10-27-2010, 05:10 PM
Chris Lumens
 
Default Remove presentRequiredMediaMessage and related code.

You've either got the one image (in which case you got into the installer),
or you don't (in which case you were kicked out earlier).
---
pyanaconda/backend.py | 4 ---
pyanaconda/image.py | 61 ----------------------------------------------
pyanaconda/yuminstall.py | 20 +--------------
3 files changed, 1 insertions(+), 84 deletions(-)

diff --git a/pyanaconda/backend.py b/pyanaconda/backend.py
index 06f8c0b..e874987 100644
--- a/pyanaconda/backend.py
+++ b/pyanaconda/backend.py
@@ -193,10 +193,6 @@ class AnacondaBackend:
def writeKS(self, f):
pass

- def getRequiredMedia(self):
- log.warning("getRequiredMedia not implmented for backend!")
- raise NotImplementedError
-
def complete(self, anaconda):
pass

diff --git a/pyanaconda/image.py b/pyanaconda/image.py
index be119cd..a95df6b 100644
--- a/pyanaconda/image.py
+++ b/pyanaconda/image.py
@@ -92,16 +92,6 @@ def findFirstIsoImage(path, messageWindow):

return None

-def getDiscNums(line):
- # get the disc numbers for this disc
- nums = line.split(",")
- if nums == ['ALL']: # Treat "ALL" DVD as disc 1
- return [1]
- discNums = []
- for num in nums:
- discNums.append(int(num))
- return discNums
-
def getMediaId(path):
if os.access("%s/.discinfo" % path, os.R_OK):
f = open("%s/.discinfo" % path)
@@ -184,57 +174,6 @@ def mountImage(isodir, tree, messageWindow):
elif ans == 1:
image = findFirstIsoImage(isodir, messageWindow)

-# 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(anaconda):
- reqcds = anaconda.backend.getRequiredMedia()
-
- # if only one CD required no need to pop up a message
- if len(reqcds) < 2:
- return
-
- # check what discs our currently mounted one provides
- if os.access("%s/.discinfo" % anaconda.backend.ayum.tree, os.R_OK):
- discNums = []
- try:
- f = open("%s/.discinfo" % anaconda.backend.ayum.tree)
- stamp = f.readline().strip()
- descr = f.readline().strip()
- arch = f.readline().strip()
- discNums = getDiscNums(f.readline().strip())
- f.close()
- except Exception, e:
- log.critical("Exception reading discinfo: %s" %(e,))
-
- log.info("discNums is %s" %(discNums,))
- haveall = 0
- s = set(reqcds)
- t = set(discNums)
- if s.issubset(t):
- haveall = 1
-
- if haveall == 1:
- return
-
- reqcds.sort()
- reqcds = map(lambda disc: "#%s" % disc, filter(lambda disc: disc != -99, reqcds))
- reqcdstr = ", ".join(reqcds)
-
- return anaconda.intf.messageWindow(_("Required Install Media"),
- _("The software you have selected to install will require the "
- "following %(productName)s %(productVersion)s "
- "discs:

%(reqcdstr)s
Please have these ready "
- "before proceeding with the installation. If you need to "
- "abort the installation and exit please select "
- ""Reboot".") % {'productName': product.productName,
- 'productVersion': product.productVersion,
- 'reqcdstr': reqcdstr},
- type="custom", custom_icon="warning",
- custom_buttons=[_("_Reboot"), _("_Back"), _("_Continue")])
-
# Find an attached CD/DVD drive with media in it that contains packages,
# and return that device name.
def scanForMedia(tree, storage):
diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py
index 8c23d60..c13bc13 100644
--- a/pyanaconda/yuminstall.py
+++ b/pyanaconda/yuminstall.py
@@ -1111,7 +1111,7 @@ class AnacondaYum(YumSorter):
spaceprob = to_unicode(spaceprob)
fileprob = to_unicode(fileprob)

- if len(self.anaconda.backend.getRequiredMedia()) > 1 or self.anaconda.upgrade:
+ if self.anaconda.upgrade:
intf.detailedMessageWindow(_("Error Running Transaction"),
msg, spaceprob + "
" + fileprob, type="custom",
custom_icon="error", custom_buttons=[_("_Exit installer")])
@@ -1588,21 +1588,6 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
return DISPATCH_BACK

dscb.pop()
-
- if anaconda.mediaDevice and not anaconda.ksdata:
- rc = presentRequiredMediaMessage(anaconda)
- if rc == 0:
- rc2 = anaconda.intf.messageWindow(_("Reboot?"),
- _("The system will be rebooted now."),
- type="custom", custom_icon="warning",
- custom_buttons=[_("_Back"), _("_Reboot")])
- if rc2 == 1:
- sys.exit(0)
- else:
- return DISPATCH_BACK
- elif rc == 1: # they asked to go back
- return DISPATCH_BACK
-
self.ayum.dsCallback = None

def doPreInstall(self, anaconda):
@@ -2046,9 +2031,6 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
def writeConfiguration(self):
return

- def getRequiredMedia(self):
- return self.ayum.tsInfo.reqmedia.keys()
-
class DownloadHeaderProgress:
def __init__(self, intf, ayum=None):
window = intf.progressWindow(_("Installation Starting"),
--
1.7.1.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 07:18 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org