[PATCH 1/2] iutil: add 'bits' arg to isPPC (like isX86)

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

 



isPPC now takes a 'bits={32,64}' argument, like isX86. This lets us
differentiate between ppc64 and (32-bit) ppc, which is important now
that yum considers ppc64 and ppc to have different basearches (again,
like X86).
---
 pyanaconda/iutil.py |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index 03dfdba..167a379 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -733,8 +733,20 @@ def isX86(bits=None):
 
     return False
 
-def isPPC():
-    return os.uname()[4].startswith('ppc')
+def isPPC(bits=None):
+    arch = os.uname()[4]
+
+    if bits is None:
+        if arch == 'ppc' or arch == 'ppc64':
+            return True
+    elif bits == 32:
+        if arch == 'ppc':
+            return True
+    elif bits == 64:
+        if arch == 'ppc64':
+            return True
+
+    return False
 
 def isS390():
     return os.uname()[4].startswith('s390')
-- 
1.7.6.2

_______________________________________________
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