]> git.ipfire.org Git - pakfire.git/commitdiff
Fix building for "noarch".
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 1 Feb 2012 22:57:29 +0000 (23:57 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 1 Feb 2012 22:57:29 +0000 (23:57 +0100)
It was searched for a noarch architecture which is
just virtual. The achitecture for the build should
be the default one of the build host.

python/pakfire/distro.py

index ade786eef7116f676ab469e5bb1c0f6aaa883aa8..fc12d121dc8fa71630e586e93d00ed46cb6fda93 100644 (file)
@@ -105,7 +105,13 @@ class Distribution(object):
                return self._data.get("maintainer")
 
        def get_arch(self):
-               return self._data.get("arch") or self.config.host_arch
+               arch = self._data.get("arch") or self.config.host_arch
+
+               # We can not set up a build environment for noarch.
+               if arch == "noarch":
+                       arch = system.arch
+
+               return arch
        
        def set_arch(self, arch):
                # XXX check if we are allowed to set this arch