Blob Blame History Raw
diff -uNr yum-3.4.3-orig/rpmUtils/arch.py yum-3.4.3/rpmUtils/arch.py
--- yum-3.4.3-orig/rpmUtils/arch.py	2011-11-30 19:24:32.000000000 -0600
+++ yum-3.4.3/rpmUtils/arch.py	2011-11-30 19:24:58.000000000 -0600
@@ -2,6 +2,7 @@
 #
 
 import os
+import rpm
 
 _ppc64_native_is_best = True
 
@@ -65,6 +66,10 @@
     "armv5tejl": "armv5tel",
     "armv5tel": "noarch",
 
+    #arm hardware floating point
+    "armv7hnl": "armv7hl",
+    "armv7hl": "noarch",
+
     # super-h 
     "sh4a": "sh4",
     "sh4": "noarch",
@@ -235,6 +240,13 @@
 
     return arch
 
+def getCanonARMArch(arch):
+    # the %{_target_arch} macro in rpm will let us know the abi we are using 
+    target = rpm.expandMacro('%{_target_cpu}')
+    if target.startswith('armv7h'):
+        return target
+    return arch
+
 def getCanonPPCArch(arch):
     # FIXME: should I do better handling for mac, etc?
     if arch != "ppc64":
@@ -312,6 +324,8 @@
     if (len(arch) == 4 and arch[0] == "i" and arch[2:4] == "86"):
         return getCanonX86Arch(arch)
 
+    if arch.startswith("arm"):
+        return getCanonARMArch(arch)
     if arch.startswith("ppc"):
         return getCanonPPCArch(arch)
     if arch.startswith("sparc"):
@@ -363,6 +377,8 @@
         return "sparc"
     elif myarch.startswith("ppc64") and not _ppc64_native_is_best:
         return "ppc"
+    elif myarch.startswith("armv7h"):
+        return "armhfp"
     elif myarch.startswith("arm"):
         return "arm"