[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 4/6] Take into account i386->i586 when warning on upgrade arch mismatch.
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH 4/6] Take into account i386->i586 when warning on upgrade arch mismatch.
- Date: Fri, 27 Mar 2009 16:11:23 -0400
---
upgrade.py | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/upgrade.py b/upgrade.py
index 6f6ddd0..79231af 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -69,17 +69,24 @@ def guessGuestArch(rootdir):
def isUpgradingArch(anaconda):
"""anaconda -> (bool, oldarch)
- Check if the upgrade should change architecture of instalation"""
+ Check if the upgrade should change architecture of installation"""
+
+ def compareArch(a, b):
+ import re
+ if re.match("i.86", a) and re.match("i.86", b):
+ return True
+ else
+ return a == b
try:
rpmplatform = open(anaconda.rootPath+"/etc/rpm/platform").readline().strip()
rpmarch = rpmplatform[:rpmplatform.index("-")]
- return rhpl.arch.canonArch!=rpmarch, rpmarch
+ return compareArch(rhpl.arch.canonArch, rpmarch), rpmarch
except IOError:
#try some fallback methods
rpmarch = guessGuestArch(anaconda.rootPath)
if rpmarch:
- return rhpl.arch.canonArch!=rpmarch, rpmarch
+ return compareArch(rhpl.arch.canonArch, rpmarch), rpmarch
else:
return False, "unknown"
--
1.6.1.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]