packages: yum/yum-amd64.patch - no need to canon x86_64 arch on th

glen glen at pld-linux.org
Wed Nov 18 13:05:47 CET 2009


Author: glen                         Date: Wed Nov 18 12:05:47 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- no need to canon x86_64 arch on th

---- Files affected:
packages/yum:
   yum-amd64.patch (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/yum/yum-amd64.patch
diff -u packages/yum/yum-amd64.patch:1.2 packages/yum/yum-amd64.patch:1.3
--- packages/yum/yum-amd64.patch:1.2	Wed Nov 18 13:05:08 2009
+++ packages/yum/yum-amd64.patch	Wed Nov 18 13:05:41 2009
@@ -1,11 +1,39 @@
---- yum-3.2.0/rpmUtils/arch.py~	2007-04-27 15:58:04.000000000 +0300
-+++ yum-3.2.0/rpmUtils/arch.py	2007-05-31 14:00:56.920945155 +0300
-@@ -242,6 +242,8 @@
-             pass
-         
-     arch = os.uname()[4]
-+    if arch == "x86_64":
-+        arch = "amd64"
+--- yum-3.2.25/rpmUtils/arch.py~	2009-09-15 23:58:51.000000000 +0300
++++ yum-3.2.25/rpmUtils/arch.py	2009-11-18 14:02:08.718489471 +0200
+@@ -280,27 +280,6 @@
+         return "sparcv8"
+     return arch
+ 
+-def getCanonX86_64Arch(arch):
+-    if arch != "x86_64":
+-        return arch
+-
+-    vendor = None
+-    f = open("/proc/cpuinfo", "r")
+-    lines = f.readlines()
+-    f.close()
+-    for line in lines:
+-        if line.startswith("vendor_id"):
+-            vendor = line.split(':')[1]
+-            break
+-    if vendor is None:
+-        return arch
+-
+-    if vendor.find("Authentic AMD") != -1 or vendor.find("AuthenticAMD") != -1:
+-        return "amd64"
+-    if vendor.find("GenuineIntel") != -1:
+-        return "ia32e"
+-    return arch
+-        
+ def getCanonArch(skipRpmPlatform = 0):
+     if not skipRpmPlatform and os.access("/etc/rpm/platform", os.R_OK):
+         try:
+@@ -321,8 +300,6 @@
+         return getCanonPPCArch(arch)
+     if arch.startswith("sparc"):
+         return getCanonSPARCArch(arch)
+-    if arch == "x86_64":
+-        return getCanonX86_64Arch(arch)
+ 
+     return arch
  
-     if (len(arch) == 4 and arch[0] == "i" and arch[2:4] == "86"):
-         return getCanonX86Arch(arch)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/yum/yum-amd64.patch?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list