diff mbox

Quantal: End of the line for i386 non-PAE

Message ID 4FB13A2A.7000908@canonical.com
State New
Headers show

Commit Message

Tim Gardner May 14, 2012, 5 p.m. UTC
On 05/08/2012 09:49 AM, Tim Gardner wrote:
> On 05/08/2012 08:13 AM, Phillip Susi wrote:
>> On 5/2/2012 10:57 AM, Tim Gardner wrote:
>>> Any ideas on how we might allow PAE capable CPUs to upgrade? Is this the
>>> job of update-manager ? It seems likely that Debian must have
>>> encountered this issue before.
>>
>> With a Replaces: line in the control file of the new kernel?
>>
>>
> 
> The suggestion offered yesterday in the kernel flavours session was to
> add a pre-install hook in the meta package to determine if the CPU was
> PAE capable, and to stop the upgrade if not.
> 
> rtg

And here it is...
diff mbox

Patch

From f236b5ae22f616078bd9f7066fa32f21aa1fbd09 Mon Sep 17 00:00:00 2001
From: Tim Gardner <tim.gardner@canonical.com>
Date: Mon, 14 May 2012 09:19:52 -0600
Subject: [PATCH] UBUNTU: Prevent upgrading a non-PAE CPU

Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
 debian/control-scripts/preinst |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/debian/control-scripts/preinst b/debian/control-scripts/preinst
index 6824225..32b4fc2 100644
--- a/debian/control-scripts/preinst
+++ b/debian/control-scripts/preinst
@@ -90,6 +90,12 @@  die "Pre inst Internal error. Aborting." unless $version;
 exit 0 if $ARGV[0] =~ /abort-upgrade/;
 exit 1 unless $ARGV[0] =~ /(install|upgrade)/;
 
+system ("grep -q ' pae ' /proc/cpuinfo");
+if ($?) {
+        print "This kernel does not support a non-PAE CPU.\n";
+        exit 1;
+}
+
 # remove multiple leading slashes; make sure there is at least one.
 $realimageloc  =~ s|^/*|/|o;
 $realimageloc  =~ s|/+|/|o;
-- 
1.7.9.5