yifengyou / rpms / yum

Forked from rpms/yum 3 years ago
Clone

Blame SOURCES/BZ-1272058-arches.patch

5e9bef
commit 13a1fddf27dd16a70b639630d209c0f16bd5097e
5e9bef
Author: Dennis Gilmore <dennis@ausil.us>
5e9bef
Date:   Wed Feb 12 18:12:54 2014 -0500
5e9bef
5e9bef
     ppc64le is its own arch treat it as such.
5e9bef
    
5e9bef
     ppc64le is ppc64 little endian, it is a completely incompatable arch
5e9bef
    to all other 64 bit power builds and can not be multilibbed with ppc.
5e9bef
    While it works okay in the default Fedora setup its because Fedora
5e9bef
    patches _ppc64_native_is_best to True as soon as its False you get
5e9bef
    unexpected results.
5e9bef
     This patch covers things in both setups and makes it clear how it
5e9bef
    works.
5e9bef
    
5e9bef
    Signed-off-by: Dennis Gilmore <dennis@ausil.us>
5e9bef
5e9bef
diff --git a/rpmUtils/arch.py b/rpmUtils/arch.py
5e9bef
index 6172b1a..54fa189 100644
5e9bef
--- a/rpmUtils/arch.py
5e9bef
+++ b/rpmUtils/arch.py
5e9bef
@@ -31,7 +31,10 @@ arches = {
5e9bef
     "x86_64": "athlon",
5e9bef
     "amd64": "x86_64",
5e9bef
     "ia32e": "x86_64",
5e9bef
-    
5e9bef
+
5e9bef
+    #ppc64le
5e9bef
+    "ppc64le":  "noarch",
5e9bef
+
5e9bef
     # ppc
5e9bef
     "ppc64p7": "ppc64",
5e9bef
     "ppc64pseries": "ppc64",
5e9bef
@@ -412,7 +415,7 @@ def getBestArch(myarch=None):
5e9bef
     if arch.startswith("sparc64"):
5e9bef
         arch = multilibArches[arch][1]
5e9bef
 
5e9bef
-    if arch.startswith("ppc64") and not _ppc64_native_is_best:
5e9bef
+    if arch.startswith("ppc64") and not _ppc64_native_is_best and arch != "ppc64le":
5e9bef
         arch = 'ppc'
5e9bef
 
5e9bef
     return arch
5e9bef
@@ -430,6 +433,8 @@ def getBaseArch(myarch=None):
5e9bef
 
5e9bef
     if myarch.startswith("sparc64"):
5e9bef
         return "sparc"
5e9bef
+    elif myarch == "ppc64le":
5e9bef
+        return "ppc64le"
5e9bef
     elif myarch.startswith("ppc64") and not _ppc64_native_is_best:
5e9bef
         return "ppc"
5e9bef
     elif myarch.startswith("arm64"):
5e9bef
commit 1a1a33f195a6fb6e8738e48fcb6142c53a539b6d
5e9bef
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
5e9bef
Date:   Tue Apr 5 14:54:05 2016 +0200
5e9bef
5e9bef
    Add aarch64 to rpmUtils.arch.arches.
5e9bef
5e9bef
diff --git a/rpmUtils/arch.py b/rpmUtils/arch.py
5e9bef
index a3bade5..d63ec25 100644
5e9bef
--- a/rpmUtils/arch.py
5e9bef
+++ b/rpmUtils/arch.py
5e9bef
@@ -80,6 +80,9 @@ arches = {
5e9bef
     # arm64
5e9bef
     "arm64": "noarch",
5e9bef
 
5e9bef
+    # aarch64
5e9bef
+    "aarch64": "noarch",
5e9bef
+
5e9bef
     # super-h 
5e9bef
     "sh4a": "sh4",
5e9bef
     "sh4": "noarch",