summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--isys/isys.py29
-rw-r--r--yuminstall.py15
3 files changed, 52 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c49e27b5f..8ca42c940 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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)