From fc6030edaa3f7703c59b1d490ad856d5e7ed1248 Mon Sep 17 00:00:00 2001 From: Will Woods Date: Tue, 5 Jul 2011 13:32:48 -0400 Subject: [PATCH] Fix libdir to match basearch (not buildarch), use getBaseArch Let's let yum handle the magic of figuring out what basearch is. And since basearch will match userspace, libdir should match basearch. This fixes stuff on pre-F16 ppc64 (where basearch is ppc and thus has a different libdir). --- src/pylorax/__init__.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 1be66002..7a7ed203 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -42,6 +42,7 @@ import ltmpl import imgutils from sysutils import * +from rpmUtils.arch import getBaseArch from treebuilder import RuntimeBuilder, TreeBuilder from buildstamp import BuildStamp @@ -50,15 +51,10 @@ from discinfo import DiscInfo class ArchData(DataHolder): lib64_arches = ("x86_64", "ppc64", "sparc64", "s390x", "ia64") - archmap = {"i386": "i386", "i586":"i386", "i686":"i386", "x86_64":"x86_64", - "ppc":"ppc", "ppc64": "ppc", - "sparc":"sparc", "sparcv9":"sparc", "sparc64":"sparc", - "s390":"s390", "s390x":"s390x", - } def __init__(self, buildarch): self.buildarch = buildarch - self.basearch = self.archmap.get(buildarch) or buildarch - self.libdir = "lib64" if buildarch in self.lib64_arches else "lib" + self.basearch = getBaseArch(buildarch) + self.libdir = "lib64" if basearch in self.lib64_arches else "lib" class Lorax(BaseLoraxClass):