From: Michael Tremer Date: Wed, 1 Feb 2012 22:57:29 +0000 (+0100) Subject: Fix building for "noarch". X-Git-Tag: 0.9.20~14^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=97146692ae4c68cdbbbbe72b019eea60b29a967d;p=pakfire.git Fix building for "noarch". 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. --- diff --git a/python/pakfire/distro.py b/python/pakfire/distro.py index ade786eef..fc12d121d 100644 --- a/python/pakfire/distro.py +++ b/python/pakfire/distro.py @@ -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