This series gets rid of split media. It gets rid of the media number from the .discinfo files. It gets rid of the code around media check for checking multiple images. It reduces the amount of silly crap we've got in yuminstall.py.
- Chris
--- pyanaconda/image.py | 13 ++++--------- pyanaconda/yuminstall.py | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/pyanaconda/image.py b/pyanaconda/image.py index 4a36bbe..1b2a5bc 100644 --- a/pyanaconda/image.py +++ b/pyanaconda/image.py @@ -255,7 +255,7 @@ def scanForMedia(tree, storage): except: continue
- if not verifyMedia(tree, 1): + if not verifyMedia(tree): dev.format.unmount() continue
@@ -284,7 +284,7 @@ def unmountCD(dev, messageWindow): "and then click OK to retry.") % (dev.path,))
-def verifyMedia(tree, discnum, timestamp=None): +def verifyMedia(tree, timestamp=None): if os.access("%s/.discinfo" % tree, os.R_OK): f = open("%s/.discinfo" % tree)
@@ -300,18 +300,13 @@ def verifyMedia(tree, discnum, timestamp=None): except: arch = None
- try: - discs = getDiscNums(f.readline().strip()) - except: - discs = [ 0 ] - f.close()
if timestamp is not None: - if newStamp == timestamp and arch == _arch and discnum in discs: + if newStamp == timestamp and arch == _arch: return True else: - if arch == _arch and discnum in discs: + if arch == _arch: return True
return False diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py index b52f37c..eca00e5 100644 --- a/pyanaconda/yuminstall.py +++ b/pyanaconda/yuminstall.py @@ -397,7 +397,7 @@ class AnacondaYum(YumSorter): try: dev.format.mount()
- if verifyMedia(self.tree, discnum, None): + if verifyMedia(self.tree, None): self.currentMedia = discnum return
@@ -421,7 +421,7 @@ class AnacondaYum(YumSorter): try: dev.format.mount()
- if verifyMedia(self.tree, discnum, self._timestamp): + if verifyMedia(self.tree, self._timestamp): self.currentMedia = discnum break
Since there's only one image, it's pointless to go looking for more than one. This required changing around this method as well as its callers that cached the results. --- pyanaconda/image.py | 115 +++++++++++++++++++++------------------------ pyanaconda/yuminstall.py | 12 ++--- 2 files changed, 58 insertions(+), 69 deletions(-)
diff --git a/pyanaconda/image.py b/pyanaconda/image.py index 1b2a5bc..be119cd 100644 --- a/pyanaconda/image.py +++ b/pyanaconda/image.py @@ -29,11 +29,10 @@ log = logging.getLogger("anaconda")
_arch = iutil.getArch()
-def findIsoImages(path, messageWindow): +def findFirstIsoImage(path, messageWindow): flush = os.stat(path) files = os.listdir(path) arch = _arch - discImages = {}
for file in files: what = path + '/' + file @@ -44,57 +43,54 @@ def findIsoImages(path, messageWindow): try: log.debug("mounting %s on /mnt/cdimage", what) isys.mount(what, "/mnt/cdimage", fstype = "iso9660", readOnly = True) - for num in range(1, 10): - if os.access("/mnt/cdimage/.discinfo", os.R_OK): - log.debug("Reading .discinfo") - f = open("/mnt/cdimage/.discinfo") - try: - f.readline() # skip timestamp - f.readline() # skip release description - discArch = string.strip(f.readline()) # read architecture - discNum = getDiscNums(f.readline().strip()) - except: - discArch = None - discNum = [ 0 ] - - f.close() - - log.debug("discArch = %s | discNum = %s" % (discArch, discNum)) - if num not in discNum or discArch != arch: - continue - - # if it's disc1, it needs to have repodata. - if (num == 1 and not - os.access("/mnt/cdimage/repodata", os.R_OK)): - log.warning("%s doesn't have repodata, skipping" %(what,)) - continue - - # warn user if images appears to be wrong size - if os.stat(what)[stat.ST_SIZE] % 2048: - rc = messageWindow(_("Warning"), - _("The ISO image %s has a size which is not " - "a multiple of 2048 bytes. This may mean " - "it was corrupted on transfer to this computer." - "\n\n" - "It is recommended that you exit and abort your " - "installation, but you can choose to continue if " - "you think this is in error.") % (file,), - type="custom", custom_icon="warning", - custom_buttons= [_("_Exit installer"), - _("_Continue")]) - if rc == 0: - sys.exit(0) - - discImages[num] = file - log.info("Found disc %d at %s" % (num, file)) - - log.info("unmounting /mnt/cdimage") - isys.umount("/mnt/cdimage", removeDir=False) + + if os.access("/mnt/cdimage/.discinfo", os.R_OK): + log.debug("Reading .discinfo") + f = open("/mnt/cdimage/.discinfo") + try: + f.readline() # skip timestamp + f.readline() # skip release description + discArch = string.strip(f.readline()) # read architecture + except: + discArch = None + + f.close() + + log.debug("discArch = %s" % discArch) + if discArch != arch: + isys.umount("/mnt/cdimage", removeDir=False) + continue + + # If there's no repodata, there's no point in trying to + # install from it. + if not os.access("/mnt/cdimage/repodata", os.R_OK): + log.warning("%s doesn't have repodata, skipping" %(what,)) + isys.umount("/mnt/cdimage", removeDir=False) + continue + + # warn user if images appears to be wrong size + if os.stat(what)[stat.ST_SIZE] % 2048: + rc = messageWindow(_("Warning"), + _("The ISO image %s has a size which is not " + "a multiple of 2048 bytes. This may mean " + "it was corrupted on transfer to this computer." + "\n\n" + "It is recommended that you exit and abort your " + "installation, but you can choose to continue if " + "you think this is in error.") % (file,), + type="custom", custom_icon="warning", + custom_buttons= [_("_Exit installer"), + _("_Continue")]) + if rc == 0: + sys.exit(0) + + log.info("Found disc at %s" % file) + isys.umount("/mnt/cdimage", removeDir=False) + return file except SystemError: pass
- log.info("Returning with %s" % (discImages)) - return discImages + return None
def getDiscNums(line): # get the disc numbers for this disc @@ -161,35 +157,32 @@ def mountDirectory(methodstr, messageWindow): else: continue
-def mountImage(isodir, tree, discnum, messageWindow, discImages={}): +def mountImage(isodir, tree, messageWindow): if os.path.ismount(tree): raise SystemError, "trying to mount already-mounted iso image!"
- if discImages == {}: - discImages = findIsoImages(isodir, messageWindow) + image = findFirstIsoImage(isodir, messageWindow)
while True: try: - isoImage = "%s/%s" % (isodir, discImages[discnum]) + isoImage = "%s/%s" % (isodir, image) isys.mount(isoImage, tree, fstype = 'iso9660', readOnly = True) break except: ans = messageWindow(_("Missing ISO 9660 Image"), - _("The installer has tried to mount " - "image #%s, but cannot find it on " + _("The installer has tried to mount the " + "installation image, but cannot find it on " "the hard drive.\n\n" "Please copy this image to the " "drive and click Retry. Click Exit " - "to abort the installation.") - % (discnum,), type="custom", + "to abort the installation."), + type="custom", custom_icon="warning", custom_buttons=[_("_Exit"), _("_Retry")]) if ans == 0: sys.exit(0) elif ans == 1: - discImages = findIsoImages(isodir, messageWindow) - - return discImages + 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 diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py index eca00e5..8c23d60 100644 --- a/pyanaconda/yuminstall.py +++ b/pyanaconda/yuminstall.py @@ -322,7 +322,6 @@ class AnacondaYum(YumSorter): self.repoIDcounter = itertools.count()
# Only needed for hard drive and nfsiso installs. - self._discImages = {} self.isodir = None
# Only needed for media installs. @@ -441,12 +440,9 @@ class AnacondaYum(YumSorter):
# mountDirectory checks before doing anything, so it's safe to # call this repeatedly. - mountDirectory(self.anaconda.methodstr, - self.anaconda.intf.messageWindow) + mountDirectory(self.anaconda.methodstr, self.anaconda.intf.messageWindow)
- self._discImages = mountImage(self.isodir, self.tree, discnum, - self.anaconda.intf.messageWindow, - discImages=self._discImages) + mountImage(self.isodir, self.tree, self.anaconda.intf.messageWindow) self.currentMedia = discnum
def configBaseURL(self): @@ -497,8 +493,8 @@ class AnacondaYum(YumSorter): # This really should be fixed in loader instead but for now see # if there's images and if so go with this being an NFSISO # install instead. - images = findIsoImages(self.tree, self.anaconda.intf.messageWindow) - if images != {}: + image = findFirstIsoImage(self.tree, self.anaconda.intf.messageWindow) + if not image: isys.umount(self.tree, removeDir=False) self.anaconda.methodstr = "nfsiso:%s" % m[4:] self.configBaseURL()
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:\n\n%(reqcdstr)s\nPlease 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 + "\n" + 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"),
--- pyanaconda/image.py | 5 ++--- pyanaconda/yuminstall.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/image.py b/pyanaconda/image.py index a95df6b..59c2b8a 100644 --- a/pyanaconda/image.py +++ b/pyanaconda/image.py @@ -195,9 +195,8 @@ def scanForMedia(tree, storage):
return None
-def umountImage(tree, currentMedia): - if currentMedia is not None: - isys.umount(tree, removeDir=False) +def umountImage(tree): + isys.umount(tree, removeDir=False)
def unmountCD(dev, messageWindow): if not dev: diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py index c13bc13..707b4b0 100644 --- a/pyanaconda/yuminstall.py +++ b/pyanaconda/yuminstall.py @@ -435,7 +435,7 @@ class AnacondaYum(YumSorter): _("Unable to access the disc."))
def _switchImage(self, discnum): - umountImage(self.tree, self.currentMedia) + umountImage(self.tree) self.currentMedia = None
# mountDirectory checks before doing anything, so it's safe to
First, rename them to something more reasonable. We don't switch media anymore. Second, skip all the pointless currentMedia checks. --- pyanaconda/yuminstall.py | 42 +++++++++++++++++++----------------------- 1 files changed, 19 insertions(+), 23 deletions(-)
diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py index 707b4b0..461addc 100644 --- a/pyanaconda/yuminstall.py +++ b/pyanaconda/yuminstall.py @@ -379,7 +379,7 @@ class AnacondaYum(YumSorter): if not self.anaconda.bootloader.doUpgradeOnly: self.conf.installonlypkgs = []
- def _switchCD(self, discnum): + def _mountInstallCD(self): if os.access("%s/.discinfo" % self.tree, os.R_OK): f = open("%s/.discinfo" % self.tree) self._timestamp = f.readline().strip() @@ -388,24 +388,24 @@ class AnacondaYum(YumSorter): dev = self.anaconda.storage.devicetree.getDeviceByName(self.anaconda.mediaDevice) dev.format.mountpoint = self.tree
- # If self.currentMedia is None, then there shouldn't be anything - # mounted. Before going further, see if the correct disc is already - # in the drive. This saves a useless eject and insert if the user - # has for some reason already put the disc in the drive. - if self.currentMedia is None: + # See if there's any media mounted on self.tree before continuing. + # This saves a useless eject and insert if the user has already put + # the disc in the drive. + if not self.anaconda.storage.fsset.mountpoints.has_key(self.tree): try: dev.format.mount()
if verifyMedia(self.tree, None): - self.currentMedia = discnum return
dev.format.unmount() except: pass else: - unmountCD(dev, self.anaconda.intf.messageWindow) - self.currentMedia = None + if verifyMedia(self.tree, None): + return + + dev.format.unmount()
dev.eject()
@@ -414,14 +414,13 @@ class AnacondaYum(YumSorter): self.anaconda.intf.beep()
self.anaconda.intf.messageWindow(_("Change Disc"), - _("Please insert %(productName)s disc %(discnum)d to continue.") - % {'productName': productName, 'discnum': discnum}) + _("Please insert the %(productName)s disc to continue.") + % {'productName': productName})
try: dev.format.mount()
if verifyMedia(self.tree, self._timestamp): - self.currentMedia = discnum break
self.anaconda.intf.messageWindow(_("Wrong Disc"), @@ -434,16 +433,13 @@ class AnacondaYum(YumSorter): self.anaconda.intf.messageWindow(_("Error"), _("Unable to access the disc."))
- def _switchImage(self, discnum): + def _mountInstallImage(self): umountImage(self.tree) - self.currentMedia = None
# mountDirectory checks before doing anything, so it's safe to # call this repeatedly. mountDirectory(self.anaconda.methodstr, self.anaconda.intf.messageWindow) - mountImage(self.isodir, self.tree, self.anaconda.intf.messageWindow) - self.currentMedia = discnum
def configBaseURL(self): # We only have a methodstr if method= or repo= was passed to @@ -467,18 +463,18 @@ class AnacondaYum(YumSorter): self.isodir = "/mnt/isodir/%s" % path
# This takes care of mounting /mnt/isodir first. - self._switchImage(1) + self._mountInstallImage() self.mediagrabber = self.mediaHandler elif m.startswith("nfsiso:"): self.isodir = "/mnt/isodir"
- # Calling _switchImage takes care of mounting /mnt/isodir first. + # Calling _mountInstallImage takes care of mounting /mnt/isodir first. if not network.hasActiveNetDev(): if not self.anaconda.intf.enableNetwork(): self._baseRepoURL = None return
- self._switchImage(1) + self._mountInstallImage() self.mediagrabber = self.mediaHandler elif m.startswith("http") or m.startswith("ftp:"): self._baseRepoURL = m @@ -500,7 +496,7 @@ class AnacondaYum(YumSorter): self.configBaseURL() return elif m.startswith("cdrom:"): - self._switchCD(1) + self._mountInstallCD() self.mediagrabber = self.mediaHandler self._baseRepoURL = "file://%s" % self.tree else: @@ -565,9 +561,9 @@ class AnacondaYum(YumSorter): # Unmount any currently mounted ISO images and mount the one # containing the requested packages. if self.isodir: - self._switchImage(discnum) + self._mountInstallImage() else: - self._switchCD(discnum) + self._mountInstallCD()
ug = URLGrabber(checkfunc=kwargs["checkfunc"]) ug.urlgrab("%s/%s" % (self.tree, kwargs["relative"]), kwargs["local"], @@ -932,7 +928,7 @@ class AnacondaYum(YumSorter): os.unlink(package.localPkg())
if package.repo.anacondaBaseURLs[0].startswith("cdrom:"): - self._switchCD(self.currentMedia) + self._mountInstallCD() else: return
It's impossible to get into mediaHandler with CD or image mounted, and what's there only exists as a relic from when we could switch media. So remove most of it. --- pyanaconda/yuminstall.py | 14 -------------- 1 files changed, 0 insertions(+), 14 deletions(-)
diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py index 461addc..a3b4668 100644 --- a/pyanaconda/yuminstall.py +++ b/pyanaconda/yuminstall.py @@ -549,22 +549,8 @@ class AnacondaYum(YumSorter): self.repos.add(repo)
def mediaHandler(self, *args, **kwargs): - mediaid = kwargs["mediaid"] - discnum = kwargs["discnum"] relative = kwargs["relative"]
- # The package exists on media other than what's mounted right now. - if discnum != self.currentMedia: - log.info("switching from media #%s to #%s for %s" % - (self.currentMedia, discnum, relative)) - - # Unmount any currently mounted ISO images and mount the one - # containing the requested packages. - if self.isodir: - self._mountInstallImage() - else: - self._mountInstallCD() - ug = URLGrabber(checkfunc=kwargs["checkfunc"]) ug.urlgrab("%s/%s" % (self.tree, kwargs["relative"]), kwargs["local"], text=kwargs["text"], range=kwargs["range"], copy_local=1)
--- pyanaconda/iw/task_gui.py | 2 -- pyanaconda/yuminstall.py | 3 --- 2 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/pyanaconda/iw/task_gui.py b/pyanaconda/iw/task_gui.py index 42c2dfd..75d0910 100644 --- a/pyanaconda/iw/task_gui.py +++ b/pyanaconda/iw/task_gui.py @@ -281,7 +281,6 @@ class RepoEditor: repo.baseurl = "file://%s" % ayum.tree ayum.mediagrabber = ayum.mediaHandler self.anaconda.mediaDevice = cdr - ayum.currentMedia = 1 repo.mediaid = getMediaId(ayum.tree) log.info("set mediaid of repo %s to: %s" % (repo.name, repo.mediaid))
@@ -448,7 +447,6 @@ class RepoMethodstrEditor(RepoEditor):
self.anaconda.backend.ayum.mediagrabber = self.anaconda.backend.ayum.mediaHandler self.anaconda.backend.ayum.anaconda.mediaDevice = cdr - self.anaconda.backend.ayum.currentMedia = 1 log.info("found installation media on %s" % cdr) return "cdrom://%s:%s" % (cdr, self.anaconda.backend.ayum.tree)
diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py index a3b4668..7999551 100644 --- a/pyanaconda/yuminstall.py +++ b/pyanaconda/yuminstall.py @@ -325,7 +325,6 @@ class AnacondaYum(YumSorter): self.isodir = None
# Only needed for media installs. - self.currentMedia = None self.mediagrabber = None
# Where is the source media mounted? This is the directory @@ -508,7 +507,6 @@ class AnacondaYum(YumSorter): if cdr: self.mediagrabber = self.mediaHandler self.anaconda.mediaDevice = cdr - self.currentMedia = 1 log.info("found installation media on %s" % cdr) else: # No CD with media on it and no repo=/method= parameter, so @@ -933,7 +931,6 @@ class AnacondaYum(YumSorter): dev = self.anaconda.storage.devicetree.getDeviceByName(self.anaconda.mediaDevice) dev.format.mountpoint = self.tree unmountCD(dev, self.anaconda.intf.messageWindow) - self.currentMedia = None
def urlgrabberFailureCB (self, obj, *args, **kwargs): if hasattr(obj, "exception"):
--- pyanaconda/sortedtransaction.py | 87 --------------------------------- pyanaconda/yuminstall.py | 101 ++++++++++++--------------------------- 2 files changed, 31 insertions(+), 157 deletions(-) delete mode 100644 pyanaconda/sortedtransaction.py
diff --git a/pyanaconda/sortedtransaction.py b/pyanaconda/sortedtransaction.py deleted file mode 100644 index d7384bb..0000000 --- a/pyanaconda/sortedtransaction.py +++ /dev/null @@ -1,87 +0,0 @@ -# -# sortedtransaction.py -# -# Copyright (C) 2007 Red Hat, Inc. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# - -from yum.transactioninfo import TransactionData, TransactionMember, SortableTransactionData -from yum.constants import * -from yum.Errors import YumBaseError - -import urlparse -urlparse.uses_fragment.append('media') - -import logging -log = logging.getLogger("anaconda") - - -class SplitMediaTransactionData(SortableTransactionData): - def __init__(self): - SortableTransactionData.__init__(self) - self.reqmedia = {} - self.curmedia = 0 - - def __getMedia(self, po): - try: - uri = po.returnSimple('basepath') - (scheme, netloc, path, query, fragid) = urlparse.urlsplit(uri) - if scheme != "media" or not fragid: - return -99 - else: - return int(fragid) - except (KeyError, AttributeError): - return -99 - - def getMembers(self, pkgtup=None): - if not self.curmedia: - return TransactionData.getMembers(self, pkgtup) - if pkgtup is None: - returnlist = [] - for ele in self.reqmedia[self.curmedia]: - returnlist.extend(self.pkgdict[ele]) - - return returnlist - - if pkgtup in self.reqmedia[self.curmedia]: - return self.pkgdict[pkgtup] - else: - return [] - - def add(self, txmember): - if txmember.output_state in TS_INSTALL_STATES: - id = self.__getMedia(txmember.po) - if id: - if id not in self.reqmedia.keys(): - self.reqmedia[id] = [ txmember.pkgtup ] - elif txmember.pkgtup not in self.reqmedia[id]: - self.reqmedia[id].append(txmember.pkgtup) - SortableTransactionData.add(self, txmember) - - def remove(self, pkgtup): - if not self.pkgdict.has_key(pkgtup): - return - txmembers = self.pkgdict[pkgtup] - if len(txmembers) > 0: - for txmbr in txmembers: - if txmbr.output_state not in TS_INSTALL_STATES: - continue - id = self.__getMedia(txmbr.po) - if id: - self.reqmedia[id].remove(pkgtup) - if len(self.reqmedia[id]) == 0: - self.reqmedia.pop(id) - del txmbr - SortableTransactionData.remove(self, pkgtup) diff --git a/pyanaconda/yuminstall.py b/pyanaconda/yuminstall.py index 7999551..109455e 100644 --- a/pyanaconda/yuminstall.py +++ b/pyanaconda/yuminstall.py @@ -49,7 +49,6 @@ from yum.misc import to_unicode from yum.yumRepo import YumRepository from backend import AnacondaBackend from product import isBeta, productName, productVersion, productStamp -from sortedtransaction import SplitMediaTransactionData from constants import * from image import * from compssort import * @@ -309,13 +308,9 @@ class AnacondaYumRepo(YumRepository): anacondaBaseURLs = property(_getAnacondaBaseURLs, _setAnacondaBaseURLs, doc="Extends AnacondaYum.baseurl to store non-yum urls:")
-class YumSorter(yum.YumBase): - def _transactionDataFactory(self): - return SplitMediaTransactionData() - -class AnacondaYum(YumSorter): +class AnacondaYum(yum.YumBase): def __init__(self, anaconda): - YumSorter.__init__(self) + yum.YumBase.__init__(self) self.anaconda = anaconda self._timestamp = None
@@ -770,9 +765,9 @@ class AnacondaYum(YumSorter): self.preconf.root = root self.preconf.releasever = self._getReleasever() self.preconf.enabled_plugins = ["whiteout", "blacklist"] - YumSorter._getConfig(self) + yum.YumBase._getConfig(self) else: - YumSorter._getConfig(self, fn=fn, root=root, + yum.YumBase._getConfig(self, fn=fn, root=root, enabled_plugins=["whiteout", "blacklist"]) self.configBaseRepo(root=root)
@@ -879,7 +874,7 @@ class AnacondaYum(YumSorter): while True: # retrying version of download header try: - YumSorter.downloadHeader(self, po) + yum.YumBase.downloadHeader(self, po) break except yum.Errors.NoMoreMirrorsRepoError: self._handleFailure(po) @@ -967,68 +962,42 @@ class AnacondaYum(YumSorter): self.ts.ts.setColor(3)
def run(self, instLog, cb, intf): - def mediasort(a, b): - # sort so that first CD comes first, etc. -99 is a magic number - # to tell us that the cd should be last - if a == -99: - return 1 - elif b == -99: - return -1 - if a < b: - return -1 - elif a > b: - return 1 - return 0 - self.initActionTs() if self.anaconda.upgrade: self.ts.ts.setProbFilter(~rpm.RPMPROB_FILTER_DISKSPACE) self.setColor()
- # If we don't have any required media assume single disc - if self.tsInfo.reqmedia == {}: - self.tsInfo.reqmedia[0] = None - mkeys = self.tsInfo.reqmedia.keys() - mkeys.sort(mediasort) - - for i in mkeys: - self.tsInfo.curmedia = i - if i > 0: - pkgtup = self.tsInfo.reqmedia[i][0] - - try: - self.dsCallback = DownloadHeaderProgress(intf, self) - self.populateTs(keepold=0) - self.dsCallback.pop() - self.dsCallback = None - except RepoError, e: - msg = _("There was an error running your transaction for " - "the following reason: %s\n") % str(e) + try: + self.dsCallback = DownloadHeaderProgress(intf, self) + self.populateTs(keepold=0) + self.dsCallback.pop() + self.dsCallback = None + except RepoError, e: + msg = _("There was an error running your transaction for " + "the following reason: %s\n") % str(e)
- if self.anaconda.upgrade: - rc = intf.messageWindow(_("Error"), msg, type="custom", - custom_icon="error", - custom_buttons=[_("_Exit installer")]) - sys.exit(1) - else: - rc = intf.messageWindow(_("Error"), msg, - type="custom", custom_icon="error", - custom_buttons=[_("_Back"), _("_Exit installer")]) + if self.anaconda.upgrade: + rc = intf.messageWindow(_("Error"), msg, type="custom", + custom_icon="error", + custom_buttons=[_("_Exit installer")]) + sys.exit(1) + else: + rc = intf.messageWindow(_("Error"), msg, + type="custom", custom_icon="error", + custom_buttons=[_("_Back"), _("_Exit installer")])
- if rc == 1: - sys.exit(1) - else: - self.tsInfo.curmedia = None - return DISPATCH_BACK + if rc == 1: + sys.exit(1) + else: + return DISPATCH_BACK
- self.ts.check() - self.ts.order() + self.ts.check() + self.ts.order()
- if self._run(instLog, cb, intf) == DISPATCH_BACK: - self.tsInfo.curmedia = None - return DISPATCH_BACK + if self._run(instLog, cb, intf) == DISPATCH_BACK: + return DISPATCH_BACK
- self.ts.close() + self.ts.close()
def _run(self, instLog, cb, intf): # set log fd. FIXME: this is ugly. see changelog entry from 2005-09-13 @@ -1965,17 +1934,9 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon allPkgNames = map(lambda pkg: pkg.name, self.ayum.pkgSack.returnPackages()) allPkgNames.sort()
- # On CD/DVD installs, we have one transaction per CD and will end up - # checking allPkgNames against a very short list of packages. So we - # have to reset to media #0, which is an all packages transaction. - old = self.ayum.tsInfo.curmedia - self.ayum.tsInfo.curmedia = 0 - self.ayum.tsInfo.makelists() txmbrNames = map (lambda x: x.name, self.ayum.tsInfo.getMembers())
- self.ayum.tsInfo.curmedia = old - if len(self.ayum.tsInfo.instgroups) == 0 and len(txmbrNames) == 0: return
--- scripts/buildinstall | 4 ++-- scripts/makestamp.py | 15 --------------- scripts/maketreeinfo.py | 14 -------------- 3 files changed, 2 insertions(+), 31 deletions(-)
diff --git a/scripts/buildinstall b/scripts/buildinstall index 205a91e..65e5fb3 100755 --- a/scripts/buildinstall +++ b/scripts/buildinstall @@ -28,7 +28,7 @@ die() { }
usage() { - echo "Usage: buildinstall --version <version> --brand <brand> --product <product> --release <comment> [--output outputdir] [--discs <discstring>] <root>" >&2 + echo "Usage: buildinstall --version <version> --brand <brand> --product <product> --release <comment> [--output outputdir] <root>" >&2 exit 1 }
@@ -248,7 +248,7 @@ echo $MK_IMAGES $DEBUGSTR $NOGRSTR --isbeta=$ISBETA --imgdir $TREEDIR/install -- $MK_IMAGES $DEBUGSTR $NOGRSTR --isbeta=$ISBETA --imgdir $TREEDIR/install --arch $BASEARCH --product "$PRODUCTSTR" --version $VERSION --bugurl "$BUGURL" --output $OUTPUT $yumconf || die "image creation failed"
echo "Writing .discinfo file" -$MK_STAMP --releasestr="$RELEASESTR" --arch=$BASEARCH --discNum="ALL" --outfile=$OUTPUT/.discinfo +$MK_STAMP --releasestr="$RELEASESTR" --arch=$BASEARCH --outfile=$OUTPUT/.discinfo
rm -rf $TREEDIR $BUILDINSTDIR rm -f $yumconf diff --git a/scripts/makestamp.py b/scripts/makestamp.py index 0638c6d..43bb5c7 100755 --- a/scripts/makestamp.py +++ b/scripts/makestamp.py @@ -33,14 +33,11 @@ def usage(): data = {"timestamp": None, "releasestr": None, "arch": None, - "discNum": None, "outfile": None} -allDiscs = None
opts = [] for key in data.keys(): opts.append("%s=" % (key,)) -opts.append("allDiscs")
(args, extra) = getopt.getopt(sys.argv[1:], '', opts) if len(extra) > 0: @@ -50,8 +47,6 @@ if len(extra) > 0: for (str, arg) in args: if str[2:] in data.keys(): data[str[2:]] = arg - elif str == "--allDiscs": - allDiscs = 1 else: print("unknown str of ", str) usage() @@ -69,10 +64,6 @@ if data["releasestr"] is None: if data["arch"] is None: print("What arch is this disc for?") data["arch"] = sys.stdin.readline()[:-1] - -if data["discNum"] is None and allDiscs is None: - sys.stderr.write("No disc number specified; assuming disc 1\n") - data["discNum"] = "1"
if data["outfile"] is None: f = sys.stdout @@ -82,9 +73,3 @@ else: f.write("%f\n" % data["timestamp"]) f.write("%s\n" % data["releasestr"]) f.write("%s\n" % data["arch"]) -if allDiscs is None: - f.write("%s\n" % data["discNum"]) -else: - f.write("0\n") - - diff --git a/scripts/maketreeinfo.py b/scripts/maketreeinfo.py index 226d513..1dd0c49 100644 --- a/scripts/maketreeinfo.py +++ b/scripts/maketreeinfo.py @@ -41,16 +41,12 @@ data = {"timestamp": time.time(), "variant": None, "version": None, "arch": None, - "discnum": None, - "totaldiscs": None, "packagedir": None, "outfile": None} -allDiscs = None
opts = [] for key in data.keys(): opts.append("%s=" % (key,)) -opts.append("allDiscs")
(args, extra) = getopt.getopt(sys.argv[1:], '', opts) if len(extra) > 0: @@ -60,8 +56,6 @@ if len(extra) > 0: for (str, arg) in args: if str[2:] in data.keys(): data[str[2:]] = arg - elif str == "--allDiscs": - allDiscs = 1 else: print("unknown str of ", str) usage() @@ -86,14 +80,6 @@ if data["arch"] is None: sys.stderr.write("--arch missing! This is probably bad!\n") data["arch"] = ""
-if data["discnum"] is None and allDiscs is None: - sys.stderr.write("--discnum missing; assuming disc 1\n") - data["discnum"] = "1" - -if data["totaldiscs"] is None and allDiscs is None: - sys.stderr.write("--totaldiscs missing; assuming 1\n") - data["totaldiscs"] = "1" - if data["packagedir"] is None: sys.stderr.write("--packagedir missing. This might cause some weirdness.\n") data["packagedir"] = ""
--- loader/cdinstall.c | 64 ++++++--------------------------------------------- 1 files changed, 8 insertions(+), 56 deletions(-)
diff --git a/loader/cdinstall.c b/loader/cdinstall.c index acdb036..07afdd9 100644 --- a/loader/cdinstall.c +++ b/loader/cdinstall.c @@ -167,65 +167,17 @@ static void closeCdromTray(char *device) { * checksum. */ static void mediaCheckCdrom(char *cddriver) { - int rc; - int first; - - first = 1; - do { - char *descr; - char *tstamp; - int ejectcd; - - /* init every pass */ - ejectcd = 0; - descr = NULL; - - closeCdromTray(cddriver); - - /* if first time through, see if they want to eject the CD */ - /* currently in the drive (most likely the CD they booted from) */ - /* and test a different disk. Otherwise just test the disk in */ - /* the drive since it was inserted in the previous pass through */ - /* this loop, so they want it tested. */ - if (first) { - first = 0; - rc = newtWinChoice(_("Media Check"), _("Test"), _("Eject Disc"), - _("Choose "%s" to test the disc currently in " - "the drive, or "%s" to eject the disc and " - "insert another for testing."), _("Test"), - _("Eject Disc")); - - if (rc == 2) - ejectcd = 1; - } + char *descr, *tstamp;
- if (!ejectcd) { - readStampFileFromIso(cddriver, &tstamp, &descr); - doMediaCheck(cddriver, descr); + closeCdromTray(cddriver); + readStampFileFromIso(cddriver, &tstamp, &descr); + doMediaCheck(cddriver, descr);
- if (descr) - free(descr); - } + if (descr) + free(descr);
- ejectCdrom(cddriver); - - rc = newtWinChoice(_("Media Check"), _("Test"), _("Continue"), - _("If you would like to test additional media, " - "insert the next disc and press "%s". " - "Testing each disc is not strictly required, however " - "it is highly recommended. Minimally, the discs should " - "be tested prior to using them for the first time. " - "After they have been successfully tested, it is not " - "required to retest each disc prior to using it again."), - _("Test"), _("Continue")); - - if (rc == 2) { - closeCdromTray(cddriver); - return; - } else { - continue; - } - } while (1); + if (tstamp) + free(tstamp); }
/* output an error message when CD in drive is not the correct one */
--- loader/method.c | 33 --------------------------------- 1 files changed, 0 insertions(+), 33 deletions(-)
diff --git a/loader/method.c b/loader/method.c index 844048f..0d28460 100644 --- a/loader/method.c +++ b/loader/method.c @@ -127,39 +127,6 @@ int readStampFileFromIso(char *file, char **timestamp, char **releasedescr) { if (tmpptr) descr = strdup(tmpstr);
- /* skip over arch */ - if (tmpptr) - tmpptr = fgets(tmpstr, sizeof(tmpstr), f); - - /* now get the CD number */ - if (tmpptr) { - unsigned int len; - char *p, *newstr; - - tmpptr = fgets(tmpstr, sizeof(tmpstr), f); - - /* nuke newline from end of descr, stick number on end*/ - for (p=descr+strlen(descr); p != descr && !isspace(*p); p--); - - *p = '\0'; - len = strlen(descr) + strlen(tmpstr) + 10; - newstr = malloc(len); - strncpy(newstr, descr, len-1); - strncat(newstr, " ", len-1); - - /* is this a DVD or not? If disc id has commas, like */ - /* "1,2,3", its a DVD */ - if (strchr(tmpstr, ',')) - strncat(newstr, "DVD\n", len-1); - else { - strncat(newstr, "disc ", len-1); - strncat(newstr, tmpstr, len-1); - } - - free(descr); - descr = newstr; - } - fclose(f); } }
On Wed, 2010-10-27 at 13:10 -0400, Chris Lumens wrote:
This series gets rid of split media. It gets rid of the media number from the .discinfo files. It gets rid of the code around media check for checking multiple images. It reduces the amount of silly crap we've got in yuminstall.py.
- Chris
If you get rid of split media, what will happen once you have a multi-DVD release?
-- Dennis
If you get rid of split media, what will happen once you have a multi-DVD release?
The idea is that multi-DVD is too much crud, and we should be better structuring our releases to where that's not a problem. That is, spins should become more discerning and useful. Network install methods should get played up more. The livecd is a popular way of installing now, and that's not going to be multi-media.
- Chris
Chris Lumens (clumens@redhat.com) said:
If you get rid of split media, what will happen once you have a multi-DVD release?
The idea is that multi-DVD is too much crud, and we should be better structuring our releases to where that's not a problem. That is, spins should become more discerning and useful. Network install methods should get played up more. The livecd is a popular way of installing now, and that's not going to be multi-media.
I agree with this in general. But I can't help but wonder if there are anaconda-using projects that are going to be limited to doing ISO based installs for the most part, and may have to deal with split DVDs depending on how they grow.
Bill
On Wed, Oct 27, 2010 at 14:21, Bill Nottingham notting@redhat.com wrote:
Chris Lumens (clumens@redhat.com) said:
If you get rid of split media, what will happen once you have a multi-DVD release?
The idea is that multi-DVD is too much crud, and we should be better structuring our releases to where that's not a problem. That is, spins should become more discerning and useful. Network install methods should get played up more. The livecd is a popular way of installing now, and that's not going to be multi-media.
I agree with this in general. But I can't help but wonder if there are anaconda-using projects that are going to be limited to doing ISO based installs for the most part, and may have to deal with split DVDs depending on how they grow.
*cough* CentOS 5.5 *cough*
On Wed, Oct 27, 2010 at 14:35, Stephen John Smoogen smooge@gmail.com wrote:
On Wed, Oct 27, 2010 at 14:21, Bill Nottingham notting@redhat.com wrote:
Chris Lumens (clumens@redhat.com) said:
If you get rid of split media, what will happen once you have a multi-DVD release?
The idea is that multi-DVD is too much crud, and we should be better structuring our releases to where that's not a problem. That is, spins should become more discerning and useful. Network install methods should get played up more. The livecd is a popular way of installing now, and that's not going to be multi-media.
I agree with this in general. But I can't help but wonder if there are anaconda-using projects that are going to be limited to doing ISO based installs for the most part, and may have to deal with split DVDs depending on how they grow.
*cough* CentOS 5.5 *cough*
Ok just to clarify.. I know that this change will not affect CentOS 4.9, 5.[6-9] or 6.X.. but would only affect 7.X but will this affect RHEL7 if it turns out to need multi-ISO or do we want to wait til then?
On 10/27/10 2:26 PM, Stephen John Smoogen wrote:
Ok just to clarify.. I know that this change will not affect CentOS 4.9, 5.[6-9] or 6.X.. but would only affect 7.X but will this affect RHEL7 if it turns out to need multi-ISO or do we want to wait til then?
I think the answer there would be "It'll be too hard to bring split-media back. Ship less stuff in RHEL, or follow the Fedora model of only putting certain things on media"
But that's just what I would say, and I speak for myself.
I think the answer there would be "It'll be too hard to bring split-media back. Ship less stuff in RHEL, or follow the Fedora model of only putting certain things on media"
But that's just what I would say, and I speak for myself.
Yes, I agree. There are so many options here. There's shipping less stuff, there's shipping different "spins" for different products, there's using a network-based distribution method, there's using live media.
- Chris
Ok just to clarify.. I know that this change will not affect CentOS 4.9, 5.[6-9] or 6.X.. but would only affect 7.X but will this affect RHEL7 if it turns out to need multi-ISO or do we want to wait til then?
This change will only affect F15 and any distributions derived from it or later Fedora releases. So, no RHEL [456].x.
- Chris
On Thu, 2010-10-28 at 10:03 -0400, Chris Lumens wrote:
Ok just to clarify.. I know that this change will not affect CentOS 4.9, 5.[6-9] or 6.X.. but would only affect 7.X but will this affect RHEL7 if it turns out to need multi-ISO or do we want to wait til then?
This change will only affect F15 and any distributions derived from it or later Fedora releases. So, no RHEL [456].x.
- Chris
It's hard to predict the RHEL 7 requirements at this point.
Since Fedora itself is not producing split media, even if we kept the code in anaconda, it would not get any use in the Fedora space. So, I'm inclined to say yank the code and we can cross the RHEL 7 bridge when we get to it.
-- Dennis
On Thu, 28 Oct 2010, Dennis Gregorovic wrote:
On Thu, 2010-10-28 at 10:03 -0400, Chris Lumens wrote:
Ok just to clarify.. I know that this change will not affect CentOS 4.9, 5.[6-9] or 6.X.. but would only affect 7.X but will this affect RHEL7 if it turns out to need multi-ISO or do we want to wait til then?
This change will only affect F15 and any distributions derived from it or later Fedora releases. So, no RHEL [456].x.
- Chris
It's hard to predict the RHEL 7 requirements at this point.
Since Fedora itself is not producing split media, even if we kept the code in anaconda, it would not get any use in the Fedora space. So, I'm
Then use it in Fedora.
So what is the relationship of Fedora to future RHEL?
inclined to say yank the code and we can cross the RHEL 7 bridge when we get to it.
So yank it now and put it back, not very effcient. Better to leave it in and lets users that need it use it in Fedora, then it will be there for RHEL 7 .
-Connie Sieh
-- Dennis
Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list
On 10/28/2010 10:59 AM, Connie Sieh wrote:
On Thu, 28 Oct 2010, Dennis Gregorovic wrote:
On Thu, 2010-10-28 at 10:03 -0400, Chris Lumens wrote:
Ok just to clarify.. I know that this change will not affect CentOS 4.9, 5.[6-9] or 6.X.. but would only affect 7.X but will this affect RHEL7 if it turns out to need multi-ISO or do we want to wait til then?
This change will only affect F15 and any distributions derived from it or later Fedora releases. So, no RHEL [456].x.
- Chris
It's hard to predict the RHEL 7 requirements at this point.
Since Fedora itself is not producing split media, even if we kept the code in anaconda, it would not get any use in the Fedora space. So, I'm
Then use it in Fedora.
So what is the relationship of Fedora to future RHEL?
It's mostly a temporal relationship ;). Yes, RHEL 7 will come from a branched (future) Fedora. If we absolutely must have split media in RHEL 7, we can put something back in. But the installer team (and presumably release engineering) are both going to argue against it quite strongly. There's also not a lot of point in keeping the current code - mostly it will just atrophy and bit-rot between now and then.
inclined to say yank the code and we can cross the RHEL 7 bridge when we get to it.
So yank it now and put it back, not very effcient. Better to leave it in and lets users that need it use it in Fedora, then it will be there for RHEL 7 .
There's no real reason to believe code we don't use that's untested for several years will still work reasonably well. In fact, there's plenty of reason not to. Remember that when we're talking about RHEL 7, that's the fairly distant future. It's an age in terms of code. Also the real efficiency here is simple: we're going to try hard not to put it back.
So what is the relationship of Fedora to future RHEL?
RHEL 7 will be based upon some future version of Fedora (who knows which), with various other fixes applied as required.
So yank it now and put it back, not very effcient. Better to leave it in and lets users that need it use it in Fedora, then it will be there for RHEL 7 .
Because we don't want to maintain it in either distribution anymore. Please see my previous "This Week in Anaconda" post on the subject (http://www.bangmoney.org/serendipity/index.php?/archives/155-This-Week-in-An...), under the header "A crazy new idea".
- Chris
On Thu, 28 Oct 2010, Chris Lumens wrote:
Ok just to clarify.. I know that this change will not affect CentOS 4.9, 5.[6-9] or 6.X.. but would only affect 7.X but will this affect RHEL7 if it turns out to need multi-ISO or do we want to wait til then?
This change will only affect F15 and any distributions derived from it or later Fedora releases. So, no RHEL [456].x.
So what about RHEL 7 .
There were conversations on the rhelv6-beta-list that if wants to know the future of RHEL then one needs to watch Fedora. These conversations started because users of the RHEL 6 beta were "surprised" about this feature or that feature. RedHat employees said to watch Fedora .
-Connie Sieh
- Chris
Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list
This change will only affect F15 and any distributions derived from it or later Fedora releases. So, no RHEL [456].x.
So what about RHEL 7 .
Well, obviously anything we do in Fedora now will show up in RHEL 7 unless we have to later go back and make some changes.
But as for specifics, I have no idea. I'm focused on just F15 at the moment.
There were conversations on the rhelv6-beta-list that if wants to know the future of RHEL then one needs to watch Fedora. These conversations started because users of the RHEL 6 beta were "surprised" about this feature or that feature. RedHat employees said to watch Fedora .
Yep, good idea.
- Chris
Stephen John Smoogen wrote:
On Wed, Oct 27, 2010 at 14:21, Bill Nottingham notting@redhat.com
wrote:
Chris Lumens (clumens@redhat.com) said:
If you get rid of split media, what will happen once you have a multi-DVD release?
The idea is that multi-DVD is too much crud, and we should be better structuring our releases to where that's not a problem. That is,
spins
should become more discerning and useful. Network install methods should get played up more. The livecd is a popular way of
installing
now, and that's not going to be multi-media.
I agree with this in general. But I can't help but wonder if there
are
anaconda-using projects that are going to be limited to doing ISO
based
installs for the most part, and may have to deal with split DVDs
depending
on how they grow.
*cough* CentOS 5.5 *cough*
This could bite upgrades. Last year I had to put together upgrades from CentOS-4-based systems to CentOS-5-based, using CDs not DVD or network. Because several libraries had been moved to different packages between 4 and 5, the upgrade wanted 5 CDs while a fresh install of the same system only required 1. The only way I could reduce the upgrade to a single CD was to write a nasty pre-upgrade script that uninstalled a load of system packages (from alchemist to xorg-x11-libs) and hope that my far-flung users would read the instructions to run it.
Moray. "To err is human. To purr, feline"
I agree with this in general. But I can't help but wonder if there are anaconda-using projects that are going to be limited to doing ISO based installs for the most part, and may have to deal with split DVDs depending on how they grow.
If there are anaconda-using projects that have specific needs, they need to start speaking up. I don't hear from anyone else who uses anaconda in their distribution, so I can only assume they don't care about any of the decisions I'm making.
- Chris
On Wed, 27 Oct 2010, Bill Nottingham wrote:
Chris Lumens (clumens@redhat.com) said:
If you get rid of split media, what will happen once you have a multi-DVD release?
The idea is that multi-DVD is too much crud, and we should be better structuring our releases to where that's not a problem. That is, spins should become more discerning and useful. Network install methods should get played up more. The livecd is a popular way of installing now, and that's not going to be multi-media.
I agree with this in general. But I can't help but wonder if there are anaconda-using projects that are going to be limited to doing ISO based installs for the most part, and may have to deal with split DVDs depending on how they grow.
We could also consider creating install images designed for use on large capacity USB flash drives. A 32GB flash drive can hold the entire distribution and work as an installation source. Boot and install from it or just use it as the package repo.
David Cantrell wrote:
We could also consider creating install images designed for use on
large
capacity USB flash drives. A 32GB flash drive can hold the entire distribution and work as an installation source. Boot and install from
it
or just use it as the package repo.
Very useful at a single site, or for a technician to carry when visiting sites. Not so good when distributing media to many remote sites (32GB flash drive - £37.00. DVD+RW - £0.32. Competent System Administrator - priceless :-) )
Moray. "To err is human. To purr, feline"
On 10/27/10 10:40 AM, Chris Lumens wrote:
If you get rid of split media, what will happen once you have a multi-DVD release?
The idea is that multi-DVD is too much crud, and we should be better structuring our releases to where that's not a problem. That is, spins should become more discerning and useful. Network install methods should get played up more. The livecd is a popular way of installing now, and that's not going to be multi-media.
See also dual-layer DVD, or blu-ray media.
On Wed, 27 Oct 2010, Jesse Keating wrote:
On 10/27/10 10:40 AM, Chris Lumens wrote:
If you get rid of split media, what will happen once you have a multi-DVD release?
The idea is that multi-DVD is too much crud, and we should be better structuring our releases to where that's not a problem. That is, spins should become more discerning and useful. Network install methods should get played up more. The livecd is a popular way of installing now, and that's not going to be multi-media.
See also dual-layer DVD, or blu-ray media.
But if you do not have all the rpms on multiple DVD's then is is imcomplete distribution method. If one wants all of Fedora or RHEL then having all of the rpms on multiple DVD's is easier to obtain than mirroring. In the case of RHEL there is no mirroring thus multiple DVD's are required.
-Connie Sieh
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 10/27/2010 6:27 PM, Connie Sieh wrote:
But if you do not have all the rpms on multiple DVD's then is is imcomplete distribution method. If one wants all of Fedora or RHEL then having all of the rpms on multiple DVD's is easier to obtain than mirroring. In the case of RHEL there is no mirroring thus multiple DVD's are required.
I'll throw my 2 cents in here.
I currently need to have distributions available as ISO's to burn, and as NFS (or HTTP) shares for network installs. In order to save disk space, I currently only store the ISO's, and then loop-back mount them to share their contents.
This makes multi-ISO releases (that need to be merged) a pain. It forces me to copy out (unless the extra media can just be mounted inside or beside the first?) the contents and use twice the disk space. So I really prefer a single ISO.
But at the same time, I need to have a full mirror of everything local. 'Spins' (unless I don't understand them?) won't really work for me (seems like a lot of Duplication inf the ISO's? - If I have a full set of the RPMs, can't spins be just a package lists?)
I'm not sure what the solution is really. I can mount a single ISO no matter how big it gets, but if it's bigger than I can burn then I'm back in the situation of needing a second (mostly the same) ISO to burn for people.
Maybe mulitple ~4.3GB ISO's is a better solution, as long as one can just mount discs 2, 3, etc. inside disc 1.
-Connie Sieh
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/anaconda-devel-list
On Thu, Oct 28, 2010 at 08:54:18AM -0400, Kyle McDonald wrote:
I currently need to have distributions available as ISO's to burn, and as NFS (or HTTP) shares for network installs. In order to save disk space, I currently only store the ISO's, and then loop-back mount them to share their contents.
This makes multi-ISO releases (that need to be merged) a pain. It forces me to copy out (unless the extra media can just be mounted inside or beside the first?) the contents and use twice the disk space. So I really prefer a single ISO.
Not if you make a symlink tree. cp -al is your friend.
anaconda-devel@lists.stg.fedoraproject.org