summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-02-26 15:41:33 -0500
committerDavid Lehman <dlehman@redhat.com>2009-02-27 15:09:03 -0600
commit621f76f3f249730f65d92c67abb2fb8fd932baef (patch)
tree990a82dbb1a9e43717337a0694eebeeadded50a4
parent4d193ccca95115fe5b0baa4c2f4955c473f3173c (diff)
downloadanaconda-621f76f3f249730f65d92c67abb2fb8fd932baef.tar.gz
anaconda-621f76f3f249730f65d92c67abb2fb8fd932baef.tar.xz
anaconda-621f76f3f249730f65d92c67abb2fb8fd932baef.zip
Move bootloader package information into the platform module.
-rw-r--r--platform.py11
-rw-r--r--yuminstall.py12
2 files changed, 12 insertions, 11 deletions
diff --git a/platform.py b/platform.py
index 818f6af73..ef9ff0c8d 100644
--- a/platform.py
+++ b/platform.py
@@ -37,6 +37,7 @@ class Platform(object):
architecture quirks in one place to avoid lots of platform checks
throughout anaconda."""
_bootFSType = "ext3"
+ _bootloaderPackage = None
_diskType = parted.diskType["msdos"]
_minimumSector = 0
@@ -96,6 +97,10 @@ class Platform(object):
return ret
+ @property
+ def bootloaderPackage(self):
+ return self._bootloaderPackage
+
def checkBootRequest(self, req, diskset):
"""Perform an architecture-specific check on the boot device. Not all
platforms may need to do any checks. Raises an exception if there
@@ -211,10 +216,13 @@ class Alpha(Platform):
return
class IA64(EFI):
+ _bootloaderPackage = "elilo"
+
def __init__(self, anaconda):
EFI.__init__(self, anaconda)
class PPC(Platform):
+ _bootloaderPackage = "yaboot"
_ppcMachine = iutil.getPPCMachine()
@property
@@ -309,6 +317,8 @@ class NewWorldPPC(PPC):
return ret
class S390(Platform):
+ _bootloaderPackage = "s390utils"
+
def __init__(self, anaconda):
Platform.__init__(self, anaconda)
@@ -323,6 +333,7 @@ class Sparc(Platform):
return start+1
class X86(EFI):
+ _bootloaderPackage = "grub"
_isEfi = iutil.isEfi()
def __init__(self, anaconda):
diff --git a/yuminstall.py b/yuminstall.py
index fd859d84e..d66aef67b 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -1282,17 +1282,6 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
log.debug("selecting kernel-devel")
self.selectPackage("kernel-devel.%s" % (kpkg.arch,))
- def selectBootloader(self):
- if iutil.isX86():
- self.selectPackage("grub")
- elif iutil.isS390():
- self.selectPackage("s390utils")
- elif iutil.isPPC():
- self.selectPackage("yaboot")
- # XXX this needs to become grub, and we need an upgrade path...
- elif iutil.isIA64():
- self.selectPackage("elilo")
-
def selectFSPackages(self, storage):
for device in storage.fsset.devices:
# this takes care of device and filesystem packages
@@ -1326,6 +1315,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon
if not anaconda.id.getUpgrade():
# New installs only - upgrades will already have all this stuff.
self.selectBestKernel(anaconda)
+ self.selectPackage(anaconda.platform.bootloaderPackage)
self.selectBootloader()
self.selectFSPackages(anaconda.id.storage)
self.selectAnacondaNeeds()