--- upgrade.py | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/upgrade.py b/upgrade.py index be701fb..f362594 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 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list