---
 rpmUtils/arch.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/rpmUtils/arch.py b/rpmUtils/arch.py
index e3a036e..e03169e 100644
--- a/rpmUtils/arch.py
+++ b/rpmUtils/arch.py
@@ -2,6 +2,7 @@
 #
 
 import os
+import rpm
 
 # dict mapping arch -> ( multicompat, best personality, biarch personality )
 multilibArches = { "x86_64":  ( "athlon", "x86_64", "athlon" ),
@@ -62,6 +63,10 @@ arches = {
     "armv5tejl": "armv5tel",
     "armv5tel": "noarch",
 
+    #arm hardware floating point
+    "armv7hnl": "armv7hl",
+    "armv7hl": "noarch",
+
     # super-h 
     "sh4a": "sh4",
     "sh4": "noarch",
@@ -231,6 +236,13 @@ def getCanonX86Arch(arch):
 
     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":
@@ -313,6 +325,8 @@ def getCanonArch(skipRpmPlatform = 0):
     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"):
-- 
1.7.7

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to