Re: [PATCH] Take into account i386->i586 when warning on upgrade arch mismatch.

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

 



Looks good,

Regards,

Hans


On 03/26/2009 04:49 PM, Chris Lumens wrote:
---
  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"


_______________________________________________
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