[yum-commits] Branch 'yum-3_2_X' - 3 commits - rpmUtils/arch.py yumcommands.py yum/packageSack.py

James Antill james at osuosl.org
Mon Nov 14 16:33:16 UTC 2011


 rpmUtils/arch.py   |   16 ++++++++++++++++
 yum/packageSack.py |    2 ++
 yumcommands.py     |    7 +++++++
 3 files changed, 25 insertions(+)

New commits:
commit c757d314aed28e59dd92dcd0af44b0cc43744f59
Author: Dennis Gilmore <dennis at ausil.us>
Date:   Mon Nov 14 09:57:43 2011 -0600

    initial arm hardfp support

diff --git a/rpmUtils/arch.py b/rpmUtils/arch.py
index ad7bbb1..732f962 100644
--- a/rpmUtils/arch.py
+++ b/rpmUtils/arch.py
@@ -2,6 +2,7 @@
 #
 
 import os
+import rpm
 
 _ppc64_native_is_best = False
 
@@ -65,6 +66,10 @@ arches = {
     "armv5tejl": "armv5tel",
     "armv5tel": "noarch",
 
+    #arm hardware floating point
+    "armv7hnl": "armv7hl",
+    "armv7hl": "noarch",
+
     # super-h 
     "sh4a": "sh4",
     "sh4": "noarch",
@@ -235,6 +240,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":
@@ -312,6 +324,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"):
@@ -363,6 +377,8 @@ def getBaseArch(myarch=None):
         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"
         
commit c5e3af3e289d2929fc79aeb69dda76d396146762
Author: Alfred Landrum <alfred.landrum at riverbed.com>
Date:   Tue Oct 25 11:11:16 2011 -0400

    Call PackageSackBase.init from PackageSack, for added.

diff --git a/yum/packageSack.py b/yum/packageSack.py
index 4af563a..62608eb 100644
--- a/yum/packageSack.py
+++ b/yum/packageSack.py
@@ -624,6 +624,8 @@ class MetaSack(PackageSackBase):
 class PackageSack(PackageSackBase):
     """represents sets (sacks) of Package Objects"""
     def __init__(self):
+        PackageSackBase.__init__(self)
+
         self.nevra = {} #nevra[(Name, Epoch, Version, Release, Arch)] = []
         self.obsoletes = {} #obs[obsoletename] = [pkg1, pkg2, pkg3] 
                  #the package lists are packages that obsolete the key name
commit 22c804051caa3a4f5c3ffa9d98c5990e42d041f4
Author: James Antill <james at and.org>
Date:   Mon Oct 24 16:01:59 2011 -0400

    When a repo. fails in repolist, manually populate the ones after it.

diff --git a/yumcommands.py b/yumcommands.py
index a862064..172c40d 100644
--- a/yumcommands.py
+++ b/yumcommands.py
@@ -1664,6 +1664,13 @@ class RepoListCommand(YumCommand):
             except yum.Errors.RepoError:
                 if verbose:
                     raise
+                #  populate them by hand, so one failure doesn't kill everything
+                # after it.
+                for repo in base.repos.listEnabled():
+                    try:
+                        base.repos.populateSack(repo.id)
+                    except yum.Errors.RepoError:
+                        pass
 
         repos = base.repos.repos.values()
         repos.sort()


More information about the Yum-commits mailing list