[PATCH 4/6] Take into account i386->i586 when warning on upgrade arch mismatch.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux