diff options
author | Chris Lumens <clumens@redhat.com> | 2009-12-21 13:24:43 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2010-02-04 15:07:55 -0500 |
commit | 6db11661989a865a0cf59ca2be37208b498f2b71 (patch) | |
tree | 3d2bad7cdc9afed650da90c2c9c55138c3142f8e | |
parent | 738b76a60481881365db518cbeee7bdb677d97de (diff) | |
download | anaconda-6db11661989a865a0cf59ca2be37208b498f2b71.tar.gz anaconda-6db11661989a865a0cf59ca2be37208b498f2b71.tar.xz anaconda-6db11661989a865a0cf59ca2be37208b498f2b71.zip |
Move bootloader into the Anaconda object.
-rwxr-xr-x | anaconda | 10 | ||||
-rw-r--r-- | bootloader.py | 56 | ||||
-rw-r--r-- | booty/__init__.py | 16 | ||||
-rw-r--r-- | booty/alpha.py | 4 | ||||
-rw-r--r-- | booty/bootloaderInfo.py | 17 | ||||
-rw-r--r-- | booty/ia64.py | 4 | ||||
-rw-r--r-- | booty/ppc.py | 4 | ||||
-rw-r--r-- | booty/s390.py | 4 | ||||
-rw-r--r-- | booty/sparc.py | 4 | ||||
-rw-r--r-- | booty/x86.py | 6 | ||||
-rw-r--r-- | exception.py | 2 | ||||
-rw-r--r-- | installclass.py | 2 | ||||
-rw-r--r-- | instdata.py | 10 | ||||
-rw-r--r-- | iw/blpasswidget.py | 4 | ||||
-rw-r--r-- | iw/bootloader_main_gui.py | 2 | ||||
-rw-r--r-- | iw/cleardisks_gui.py | 6 | ||||
-rw-r--r-- | iw/osbootwidget.py | 2 | ||||
-rw-r--r-- | iw/timezone_gui.py | 2 | ||||
-rw-r--r-- | iw/upgrade_bootloader_gui.py | 2 | ||||
-rw-r--r-- | iw/zipl_gui.py | 2 | ||||
-rw-r--r-- | kickstart.py | 30 | ||||
-rw-r--r-- | packages.py | 2 | ||||
-rw-r--r-- | textw/partition_text.py | 2 | ||||
-rw-r--r-- | textw/timezone_text.py | 2 | ||||
-rw-r--r-- | textw/upgrade_bootloader_text.py | 2 | ||||
-rw-r--r-- | textw/zipl_text.py | 2 |
26 files changed, 99 insertions, 100 deletions
@@ -439,6 +439,7 @@ def startDebugger(signum, frame): class Anaconda(object): def __init__(self): self._backend = None + self._bootloader = None self.canReIPL = False self.desktop = desktop.Desktop() self.dir = None @@ -486,6 +487,14 @@ class Anaconda(object): return self._backend @property + def bootloader(self): + if not self._bootloader: + import booty + self._bootloader = booty.getBootloader(self) + + return self._bootloader + + @property def instClass(self): if not self._instClass: from installclass import DefaultInstall @@ -732,6 +741,7 @@ class Anaconda(object): self.firewall.writeKS(f) self.storage.writeKS(f) + self.bootloader.writeKS(f) # XXX: This is temporary until instdata goes away completely. self.id.writeKS(f) diff --git a/bootloader.py b/bootloader.py index 52604c429..e2b06a87e 100644 --- a/bootloader.py +++ b/bootloader.py @@ -64,13 +64,13 @@ def bootloaderSetupChoices(anaconda): return DISPATCH_FORWARD if anaconda.ksdata and anaconda.ksdata.bootloader.driveorder: - anaconda.id.bootloader.updateDriveList(anaconda.ksdata.bootloader.driveorder) + anaconda.bootloader.updateDriveList(anaconda.ksdata.bootloader.driveorder) else: #We want the selected bootloader drive to be preferred - pref = anaconda.id.bootloader.drivelist[:1] - anaconda.id.bootloader.updateDriveList(pref) + pref = anaconda.bootloader.drivelist[:1] + anaconda.bootloader.updateDriveList(pref) - if iutil.isEfi() and not anaconda.id.bootloader.device: + if iutil.isEfi() and not anaconda.bootloader.device: bootPart = None partitions = anaconda.storage.partitions for part in partitions: @@ -78,10 +78,10 @@ def bootloaderSetupChoices(anaconda): bootPart = part.name break if bootPart: - anaconda.id.bootloader.setDevice(bootPart) + anaconda.bootloader.setDevice(bootPart) # iSeries bootloader on upgrades - if iutil.getPPCMachine() == "iSeries" and not anaconda.id.bootloader.device: + if iutil.getPPCMachine() == "iSeries" and not anaconda.bootloader.device: bootPart = None partitions = anaconda.storage.partitions for part in partitions: @@ -90,32 +90,32 @@ def bootloaderSetupChoices(anaconda): bootPart = part.name break if bootPart: - anaconda.id.bootloader.setDevice(bootPart) + anaconda.bootloader.setDevice(bootPart) - choices = anaconda.platform.bootloaderChoices(anaconda.id.bootloader) + choices = anaconda.platform.bootloaderChoices(anaconda.bootloader) if not choices and iutil.getPPCMachine() != "iSeries": anaconda.dispatch.skipStep("instbootloader") else: anaconda.dispatch.skipStep("instbootloader", skip = 0) # FIXME: ... - anaconda.id.bootloader.images.setup(anaconda.storage) + anaconda.bootloader.images.setup(anaconda.storage) - if anaconda.id.bootloader.defaultDevice != None and choices: + if anaconda.bootloader.defaultDevice != None and choices: keys = choices.keys() # there are only two possible things that can be in the keys # mbr and boot. boot is ALWAYS present. so if the dev isn't # listed, it was mbr and we should nicely fall back to boot - if anaconda.id.bootloader.defaultDevice not in keys: + if anaconda.bootloader.defaultDevice not in keys: log.warning("MBR not suitable as boot device; installing to partition") - anaconda.id.bootloader.defaultDevice = "boot" - anaconda.id.bootloader.setDevice(choices[anaconda.id.bootloader.defaultDevice][0]) + anaconda.bootloader.defaultDevice = "boot" + anaconda.bootloader.setDevice(choices[anaconda.bootloader.defaultDevice][0]) elif choices and iutil.isMactel() and choices.has_key("boot"): # haccckkkk - anaconda.id.bootloader.setDevice(choices["boot"][0]) + anaconda.bootloader.setDevice(choices["boot"][0]) elif choices and choices.has_key("mbr"): - anaconda.id.bootloader.setDevice(choices["mbr"][0]) + anaconda.bootloader.setDevice(choices["mbr"][0]) elif choices and choices.has_key("boot"): - anaconda.id.bootloader.setDevice(choices["boot"][0]) + anaconda.bootloader.setDevice(choices["boot"][0]) def fixedMdraidGrubTarget(anaconda, grubTarget): # handle change made in F12 - before F12 mdX used to mean installation @@ -124,7 +124,7 @@ def fixedMdraidGrubTarget(anaconda, grubTarget): (product, version) = getReleaseString(anaconda.rootPath) try: if float(version) < 12: - stage1Devs = anaconda.id.bootloader.getPhysicalDevices(grubTarget) + stage1Devs = anaconda.bootloader.getPhysicalDevices(grubTarget) fixedGrubTarget = getDiskPart(stage1Devs[0], anaconda.storage)[0] log.info("Mdraid grub upgrade: %s -> %s" % (grubTarget, fixedGrubTarget)) @@ -139,21 +139,21 @@ def writeBootloader(anaconda): isys.sync() isys.sync() - if anaconda.id.bootloader.defaultDevice == -1: + if anaconda.bootloader.defaultDevice == -1: return - if anaconda.id.bootloader.doUpgradeOnly: + if anaconda.bootloader.doUpgradeOnly: (bootType, theDev) = checkbootloader.getBootloaderTypeAndBoot(anaconda.rootPath, storage=anaconda.storage) - anaconda.id.bootloader.doUpgradeonly = 1 + anaconda.bootloader.doUpgradeonly = 1 if bootType == "GRUB": if theDev.startswith('/dev/md'): theDev = fixedMdraidGrubTarget(anaconda, devicePathToName(theDev)) - anaconda.id.bootloader.useGrubVal = 1 - anaconda.id.bootloader.setDevice(devicePathToName(theDev)) + anaconda.bootloader.useGrubVal = 1 + anaconda.bootloader.setDevice(devicePathToName(theDev)) else: - anaconda.id.bootloader.doUpgradeOnly = 0 + anaconda.bootloader.doUpgradeOnly = 0 w = anaconda.intf.waitWindow(_("Bootloader"), _("Installing bootloader.")) @@ -162,15 +162,15 @@ def writeBootloader(anaconda): # getDefault needs to return a device, but that's too invasive for now. rootDev = anaconda.storage.rootDevice - if not anaconda.id.bootloader.images.getDefault(): + if not anaconda.bootloader.images.getDefault(): defaultDev = None else: - defaultDev = anaconda.storage.devicetree.getDeviceByName(anaconda.id.bootloader.images.getDefault()) + defaultDev = anaconda.storage.devicetree.getDeviceByName(anaconda.bootloader.images.getDefault()) kernelLabel = None kernelLongLabel = None - for (dev, (label, longlabel, type)) in anaconda.id.bootloader.images.getImages().items(): + for (dev, (label, longlabel, type)) in anaconda.bootloader.images.getImages().items(): if (rootDev is None and kernelLabel is None) or (dev == rootDev.name): kernelLabel = label kernelLongLabel = longlabel @@ -213,8 +213,8 @@ def writeBootloader(anaconda): dosync() try: - rc = anaconda.id.bootloader.write(anaconda.rootPath, anaconda.id.bootloader, - kernelList, otherList, defaultDev) + rc = anaconda.bootloader.write(anaconda.rootPath, anaconda.bootloader, + kernelList, otherList, defaultDev) w.pop() if rc and anaconda.intf: diff --git a/booty/__init__.py b/booty/__init__.py index f0b571d39..cc4801a77 100644 --- a/booty/__init__.py +++ b/booty/__init__.py @@ -28,25 +28,25 @@ class BootyNoKernelWarning: return self.value # return instance of the appropriate bootloader for our arch -def getBootloader(instData): +def getBootloader(anaconda): """Get the bootloader info object for your architecture""" if iutil.isX86(): import x86 - return x86.x86BootloaderInfo(instData) + return x86.x86BootloaderInfo(anaconda) elif iutil.isIA64(): import ia64 - return ia64.ia64BootloaderInfo(instData) + return ia64.ia64BootloaderInfo(anaconda) elif iutil.isS390(): import s390 - return s390.s390BootloaderInfo(instData) + return s390.s390BootloaderInfo(anaconda) elif iutil.isAlpha(): import alpha - return alpha.alphaBootloaderInfo(instData) + return alpha.alphaBootloaderInfo(anaconda) elif iutil.isPPC(): import ppc - return ppc.ppcBootloaderInfo(instData) + return ppc.ppcBootloaderInfo(anaconda) elif iutil.isSparc(): import sparc - return sparc.sparcBootloaderInfo(instData) + return sparc.sparcBootloaderInfo(anaconda) else: - return bootloaderInfo(instData) + return bootloaderInfo(anaconda) diff --git a/booty/alpha.py b/booty/alpha.py index 6fd8a195a..0ed0b8af1 100644 --- a/booty/alpha.py +++ b/booty/alpha.py @@ -140,8 +140,8 @@ class alphaBootloaderInfo(bootloaderInfo): return self.writeAboot(instRoot, bl, kernelList, chainList, defaultDev) - def __init__(self, instData): - bootloaderInfo.__init__(self, instData) + def __init__(self, anaconda): + bootloaderInfo.__init__(self, anaconda) self.useGrubVal = 0 self._configdir = "/etc" self._configname = "aboot.conf" diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py index 21e4c4160..35e9bc9d7 100644 --- a/booty/bootloaderInfo.py +++ b/booty/bootloaderInfo.py @@ -159,11 +159,11 @@ class KernelArguments: self.appendArgs += args - def __init__(self, instData): + def __init__(self, anaconda): newArgs = [] cfgFilename = "/tmp/install.cfg" - self.anaconda = instData.anaconda + self.anaconda = anaconda if iutil.isS390(): self.cargs = [] @@ -202,7 +202,6 @@ class KernelArguments: self.args = " ".join(newArgs) self.appendArgs = "" - self.id = instData class BootImages: @@ -536,8 +535,8 @@ class bootloaderInfo(object): self._drivelist = val drivelist = property(_getDriveList, _setDriveList) - def __init__(self, instData): - self.args = KernelArguments(instData) + def __init__(self, anaconda): + self.args = KernelArguments(anaconda) self.images = BootImages() self.device = None self.defaultDevice = None # XXX hack, used by kickstart @@ -549,7 +548,7 @@ class bootloaderInfo(object): self.pure = None self.above1024 = 0 self.timeout = None - self.storage = instData.storage + self.storage = anaconda.storage # this has somewhat strange semantics. if 0, act like a normal # "install" case. if 1, update lilo.conf (since grubby won't do that) @@ -673,11 +672,11 @@ class efiBootloaderInfo(bootloaderInfo): return rc return self.addNewEfiEntry(instRoot) - def __init__(self, instData, initialize = True): + def __init__(self, anaconda, initialize = True): if initialize: - bootloaderInfo.__init__(self, instData) + bootloaderInfo.__init__(self, anaconda) else: - self.storage = instData.storage + self.storage = anaconda.storage if iutil.isEfi(): self._configdir = "/boot/efi/EFI/redhat" diff --git a/booty/ia64.py b/booty/ia64.py index b2414f475..f0f01463b 100644 --- a/booty/ia64.py +++ b/booty/ia64.py @@ -32,7 +32,7 @@ class ia64BootloaderInfo(efiBootloaderInfo): return rc return self.addNewEfiEntry(instRoot) - def __init__(self, instData): - efiBootloaderInfo.__init__(self, instData) + def __init__(self, anaconda): + efiBootloaderInfo.__init__(self, anaconda) self._configname = "elilo.conf" self._bootloader = "elilo.efi" diff --git a/booty/ppc.py b/booty/ppc.py index fbdd376ea..a64034473 100644 --- a/booty/ppc.py +++ b/booty/ppc.py @@ -172,8 +172,8 @@ class ppcBootloaderInfo(bootloaderInfo): return 0 - def __init__(self, instData): - bootloaderInfo.__init__(self, instData) + def __init__(self, anaconda): + bootloaderInfo.__init__(self, anaconda) self.useYabootVal = 1 self.kernelLocation = "/boot" self._configdir = "/etc" diff --git a/booty/s390.py b/booty/s390.py index 1cc6e7167..1a4c9f3d7 100644 --- a/booty/s390.py +++ b/booty/s390.py @@ -170,8 +170,8 @@ class s390BootloaderInfo(bootloaderInfo): return self.writeChandevConf(bl, instRoot) - def __init__(self, instData): - bootloaderInfo.__init__(self, instData) + def __init__(self, anaconda): + bootloaderInfo.__init__(self, anaconda) self.useZiplVal = 1 # only used on s390 self.kernelLocation = "/boot/" self._configdir = "/etc" diff --git a/booty/sparc.py b/booty/sparc.py index c7fb9d865..8b8c78ba6 100644 --- a/booty/sparc.py +++ b/booty/sparc.py @@ -120,8 +120,8 @@ class sparcBootloaderInfo(bootloaderInfo): else: raise BootyNoKernelWarning - def __init__(self, instData): - bootloaderInfo.__init__(self, instData) + def __init__(self, anaconda): + bootloaderInfo.__init__(self, anaconda) self.useSiloVal = 1 self.kernelLocation = "/boot" self._configdir = "/etc" diff --git a/booty/x86.py b/booty/x86.py index bc0dcf6cc..d36914b7b 100644 --- a/booty/x86.py +++ b/booty/x86.py @@ -527,15 +527,15 @@ class x86BootloaderInfo(efiBootloaderInfo): return args - def __init__(self, instData): - bootloaderInfo.__init__(self, instData) + def __init__(self, anaconda): + bootloaderInfo.__init__(self, anaconda) # these have to be set /before/ efiBootloaderInfo.__init__(), or # they'll be overwritten. self._configdir = "/boot/grub" self._configname = "grub.conf" - efiBootloaderInfo.__init__(self, instData, initialize=False) + efiBootloaderInfo.__init__(self, anaconda, initialize=False) # XXX use checkbootloader to determine what to default to self.useGrubVal = 1 diff --git a/exception.py b/exception.py index f032a6d80..a7cddf668 100644 --- a/exception.py +++ b/exception.py @@ -96,7 +96,7 @@ def initExceptionHandling(anaconda): attrSkipList=[ "backend.ayum", "backend.dlpkgs", "id.accounts", - "id.bootloader.password", + "bootloader.password", "id.comps", "id.dispatch", "id.hdList", diff --git a/installclass.py b/installclass.py index 492fa7738..cc44111fd 100644 --- a/installclass.py +++ b/installclass.py @@ -200,7 +200,7 @@ class BaseInstallClass(object): def setInstallData(self, anaconda): anaconda.id.reset() - anaconda.id.bootloader.timeout = self.bootloaderTimeoutDefault + anaconda.bootloader.timeout = self.bootloaderTimeoutDefault def versionMatches(self, oldver): pass diff --git a/instdata.py b/instdata.py index 91efc6b24..fa19188ed 100644 --- a/instdata.py +++ b/instdata.py @@ -26,7 +26,6 @@ import stat import string import firewall import timezone -import booty import storage import urllib import iutil @@ -47,20 +46,11 @@ _ = lambda x: gettext.ldgettext("anaconda", x) class InstallData: def reset(self): - # Reset everything except: - # - # - The install language - - self.bootloader = booty.getBootloader(self) - if iutil.isS390() or self.anaconda.ksdata: self.firstboot = FIRSTBOOT_SKIP else: self.firstboot = FIRSTBOOT_DEFAULT - def writeKS(self, f): - self.bootloader.writeKS(f) - def __init__(self, anaconda, extraModules): self.anaconda = anaconda self.extraModules = extraModules diff --git a/iw/blpasswidget.py b/iw/blpasswidget.py index e23e07dc9..c07b4df30 100644 --- a/iw/blpasswidget.py +++ b/iw/blpasswidget.py @@ -31,9 +31,9 @@ class BootloaderPasswordWidget: self.parent = parent self.intf = anaconda.intf - if anaconda.id.bootloader.getPassword(): + if anaconda.bootloader.getPassword(): usePass = 1 - self.password = anaconda.id.bootloader.getPassword() + self.password = anaconda.bootloader.getPassword() else: usePass = 0 self.password = None diff --git a/iw/bootloader_main_gui.py b/iw/bootloader_main_gui.py index b2cde964c..05588b680 100644 --- a/iw/bootloader_main_gui.py +++ b/iw/bootloader_main_gui.py @@ -188,7 +188,7 @@ class MainBootloaderWindow(InstallWindow): def getScreen(self, anaconda): self.dispatch = anaconda.dispatch - self.bl = anaconda.id.bootloader + self.bl = anaconda.bootloader self.intf = anaconda.intf self.driveorder = self.bl.drivelist diff --git a/iw/cleardisks_gui.py b/iw/cleardisks_gui.py index 032555b12..0c59a4382 100644 --- a/iw/cleardisks_gui.py +++ b/iw/cleardisks_gui.py @@ -61,14 +61,14 @@ class ClearDisksWindow (InstallWindow): cleardisks.sort(self.anaconda.storage.compareDisks) self.anaconda.storage.clearPartDisks = cleardisks - self.anaconda.id.bootloader.updateDriveList([bootDisk]) + self.anaconda.bootloader.updateDriveList([bootDisk]) def getScreen (self, anaconda): # Skip this screen as well if we only had one disk available in the # filtering UI. if len(anaconda.storage.exclusiveDisks) == 1: anaconda.storage.clearPartDisks = anaconda.storage.exclusiveDisks - anaconda.id.bootloader.drivelist = anaconda.storage.exclusiveDisks + anaconda.bootloader.drivelist = anaconda.storage.exclusiveDisks return None (xml, self.vbox) = gui.getGladeWidget("cleardisks.glade", "vbox") @@ -149,7 +149,7 @@ class ClearDisksWindow (InstallWindow): rightVisible = d in self.anaconda.storage.clearPartDisks rightActive = rightVisible and \ - d in self.anaconda.id.bootloader.drivelist[:1] + d in self.anaconda.bootloader.drivelist[:1] leftVisible = not rightVisible self.store.append(None, (device, leftVisible, True, diff --git a/iw/osbootwidget.py b/iw/osbootwidget.py index d73786328..42fc73a39 100644 --- a/iw/osbootwidget.py +++ b/iw/osbootwidget.py @@ -35,7 +35,7 @@ class OSBootWidget: """Widget to display OSes to boot and allow adding new ones.""" def __init__(self, anaconda, parent, blname = None): - self.bl = anaconda.id.bootloader + self.bl = anaconda.bootloader self.storage = anaconda.storage self.parent = parent self.intf = anaconda.intf diff --git a/iw/timezone_gui.py b/iw/timezone_gui.py index 4a6ca7983..c5ecd889d 100644 --- a/iw/timezone_gui.py +++ b/iw/timezone_gui.py @@ -105,7 +105,7 @@ class TimezoneWindow(InstallWindow): self.utcCheckbox.set_active(asUTC) if not anaconda.ksdata: - self.utcCheckbox.set_active(not hasWindows(anaconda.id.bootloader)) + self.utcCheckbox.set_active(not hasWindows(anaconda.bootloader)) self.notebook.remove(self.vbox) return self.vbox diff --git a/iw/upgrade_bootloader_gui.py b/iw/upgrade_bootloader_gui.py index 5c96f4192..caaf2f38a 100644 --- a/iw/upgrade_bootloader_gui.py +++ b/iw/upgrade_bootloader_gui.py @@ -113,7 +113,7 @@ class UpgradeBootloaderWindow (InstallWindow): def getScreen(self, anaconda): self.dispatch = anaconda.dispatch - self.bl = anaconda.id.bootloader + self.bl = anaconda.bootloader newToLibata = self._newToLibata(anaconda.rootPath) diff --git a/iw/zipl_gui.py b/iw/zipl_gui.py index b90eaae2b..a4c36aaa0 100644 --- a/iw/zipl_gui.py +++ b/iw/zipl_gui.py @@ -48,7 +48,7 @@ class ZiplWindow (InstallWindow): # ZiplWindow tag="zipl" def getScreen(self, anaconda): self.dispatch = anaconda.dispatch - self.bl = anaconda.id.bootloader + self.bl = anaconda.bootloader self.intf = anaconda.intf imageList = self.bl.images.getImages() diff --git a/kickstart.py b/kickstart.py index 1a51c3191..1d181a32b 100644 --- a/kickstart.py +++ b/kickstart.py @@ -218,8 +218,8 @@ class Bootloader(commands.bootloader.F12_Bootloader): raise KickstartValueError, formatErrorMsg(self.lineno, msg="Selected upgrade mode for bootloader but not doing an upgrade") if self.upgrade: - anaconda.id.bootloader.kickstart = 1 - anaconda.id.bootloader.doUpgradeOnly = 1 + anaconda.bootloader.kickstart = 1 + anaconda.bootloader.doUpgradeOnly = 1 if location is None: anaconda.ksdata.permanentSkipSteps.extend(["bootloadersetup", "instbootloader"]) @@ -227,21 +227,21 @@ class Bootloader(commands.bootloader.F12_Bootloader): anaconda.ksdata.showSteps.append("bootloader") if self.appendLine: - anaconda.id.bootloader.args.append(self.appendLine) + anaconda.bootloader.args.append(self.appendLine) if self.password: - anaconda.id.bootloader.setPassword(self.password, isCrypted = 0) + anaconda.bootloader.setPassword(self.password, isCrypted = 0) if self.md5pass: - anaconda.id.bootloader.setPassword(self.md5pass) + anaconda.bootloader.setPassword(self.md5pass) if location != None: - anaconda.id.bootloader.defaultDevice = location + anaconda.bootloader.defaultDevice = location else: - anaconda.id.bootloader.defaultDevice = -1 + anaconda.bootloader.defaultDevice = -1 if self.timeout: - anaconda.id.bootloader.timeout = self.timeout + anaconda.bootloader.timeout = self.timeout # add unpartitioned devices that will get partitioned into # bootloader.drivelist @@ -251,24 +251,24 @@ class Bootloader(commands.bootloader.F12_Bootloader): if shouldClear(disk, anaconda.storage.clearPartType, anaconda.storage.clearPartDisks): # add newly partitioned disks to the drivelist - anaconda.id.bootloader.drivelist.append(disk.name) - elif disk.name in anaconda.id.bootloader.drivelist: + anaconda.bootloader.drivelist.append(disk.name) + elif disk.name in anaconda.bootloader.drivelist: # remove unpartitioned disks from the drivelist - anaconda.id.bootloader.drivelist.remove(disk.name) - anaconda.id.bootloader.drivelist.sort( - cmp=anaconda.id.storage.compareDisks) + anaconda.bootloader.drivelist.remove(disk.name) + anaconda.bootloader.drivelist.sort( + cmp=anaconda.storage.compareDisks) # Throw out drives specified that don't exist. if self.driveorder and len(self.driveorder) > 0: new = [] for drive in self.driveorder: - if drive in anaconda.id.bootloader.drivelist: + if drive in anaconda.bootloader.drivelist: new.append(drive) else: log.warning("requested drive %s in boot drive order " "doesn't exist" %(drive,)) - anaconda.id.bootloader.updateDriveList(new) + anaconda.bootloader.updateDriveList(new) anaconda.ksdata.permanentSkipSteps.extend(["upgbootloader", "bootloader"]) diff --git a/packages.py b/packages.py index 3d5cd1eee..454710e62 100644 --- a/packages.py +++ b/packages.py @@ -308,7 +308,7 @@ def rpmSetupGraphicalSystem(anaconda): if iutil.isConsoleOnVirtualTerminal() and \ ts.dbMatch('provides', 'rhgb').count() or \ ts.dbMatch('provides', 'plymouth').count(): - anaconda.id.bootloader.args.append("rhgb quiet") + anaconda.bootloader.args.append("rhgb quiet") if ts.dbMatch('provides', 'service(graphical-login)').count() and \ anaconda.displayMode == 'g' and not flags.usevnc: diff --git a/textw/partition_text.py b/textw/partition_text.py index 6d1e61b19..f021e4f34 100644 --- a/textw/partition_text.py +++ b/textw/partition_text.py @@ -130,7 +130,7 @@ class PartitionTypeWindow: if rc == "F2": if self.addDriveDialog(screen) != INSTALL_BACK: anaconda.storage.reset() - anaconda.id.bootloader.updateDriveList() + anaconda.bootloader.updateDriveList() continue if res == TEXT_BACK_CHECK: diff --git a/textw/timezone_text.py b/textw/timezone_text.py index d39fc998c..c78442a2d 100644 --- a/textw/timezone_text.py +++ b/textw/timezone_text.py @@ -73,7 +73,7 @@ class TimezoneWindow: t = TextboxReflowed(30, _("In which time zone are you located?")) - if not anaconda.ksdata and not hasWindows(anaconda.id.bootloader): + if not anaconda.ksdata and not hasWindows(anaconda.bootloader): asUtc = True # diff --git a/textw/upgrade_bootloader_text.py b/textw/upgrade_bootloader_text.py index 3f2d1273e..db736f35c 100644 --- a/textw/upgrade_bootloader_text.py +++ b/textw/upgrade_bootloader_text.py @@ -83,7 +83,7 @@ class UpgradeBootloaderWindow: def __call__(self, screen, anaconda): self.screen = screen self.dispatch = anaconda.dispatch - self.bl = anaconda.id.bootloader + self.bl = anaconda.bootloader newToLibata = self._ideToLibata(anaconda.rootPath) (self.type, self.bootDev) = \ diff --git a/textw/zipl_text.py b/textw/zipl_text.py index b112e0b5b..23789ff68 100644 --- a/textw/zipl_text.py +++ b/textw/zipl_text.py @@ -29,7 +29,7 @@ _ = lambda x: gettext.ldgettext("anaconda", x) class ZiplWindow: def __call__(self, screen, anaconda): - self.bl = anaconda.id.bootloader + self.bl = anaconda.bootloader t = TextboxReflowed(53, _("The z/IPL Boot Loader will be installed " |