diff options
author | Peter Jones <pjones@redhat.com> | 2007-07-06 15:36:55 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2007-07-06 15:36:55 +0000 |
commit | 06b8026a639d228272b4da7e804e88dc9cd0c56c (patch) | |
tree | e64edbd3a3f5bd3a3eae08d6cfb203b9d25ea9b7 | |
parent | 943e1178ca5aa821696693af4f561d322cd30efe (diff) | |
download | anaconda-06b8026a639d228272b4da7e804e88dc9cd0c56c.tar.gz anaconda-06b8026a639d228272b4da7e804e88dc9cd0c56c.tar.xz anaconda-06b8026a639d228272b4da7e804e88dc9cd0c56c.zip |
- install the PAE kernel when applicable (#207573).
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | isys/isys.py | 29 | ||||
-rw-r--r-- | yuminstall.py | 15 |
3 files changed, 52 insertions, 0 deletions
@@ -1,3 +1,11 @@ +2007-07-06 Peter Jones <pjones@redhat.com> + + * isys/isys.py: add isPaeAvailable() to test for the need to use a PAE + kernel. + + * yuminstall.py (YumBackend.selectBestKernel): install the PAE kernel + when applicable (#207573). + 2007-07-03 Peter Jones <pjones@redhat.com> * scripts/upd-updates: script to update files in an updates.img that's diff --git a/isys/isys.py b/isys/isys.py index 6293f497a..6e10b7ed7 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -1039,6 +1039,35 @@ def netmask2prefix (netmask): return prefix +isPAE = None +def isPaeAvailable(): + global isPAE + if isPAE is not None: + return isPAE + + isPAE = False + if rhpl.getArch() not in ("i386", "x86_64"): + return isPAE + + try: + f = open("/proc/iomem", "r") + lines = f.readlines() + for line in lines: + if line[0].isspace(): + continue + start = line.split(' ')[0].split('-')[0] + start = long(start, 16) + + if start > 0x100000000L: + isPAE = True + break + + f.close() + except: + pass + + return isPAE + auditDaemon = _isys.auditdaemon handleSegv = _isys.handleSegv diff --git a/yuminstall.py b/yuminstall.py index 29db6af08..8b6b73dbd 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -929,6 +929,21 @@ class YumBackend(AnacondaBackend): log.debug("selecting kernel-smp-devel") self.selectPackage("kernel-smp-devel.%s" % (kpkg.arch,)) + if not foundkernel and isys.isPaeAvailable(): + try: + kpae = getBestKernelByArch("kernel-PAE", self.ayum) + except PackageSackError: + kpae = None + log.debug("no kernel-PAE package") + + if kpae and kpae.returnSimple("arch") == kpkg.returnSimple("arch"): + foundkernel = True + log.info("select kernel-PAE package for kernel") + self.ayum.install(po=kpae) + if len(self.ayum.tsInfo.matchNaevr(name="gcc")) > 0: + log.debug("selecting kernel-PAE-devel") + self.selectPackage("kernel-PAE-devel.%s" % (kpkg.arch,)) + if not foundkernel: log.info("selected kernel package for kernel") self.ayum.install(po=kpkg) |