revert <ExcludeArch> regex support, add armv7l to the <ExcludeArch> values

This commit is contained in:
Mehmet Emre Atasever
2011-04-27 16:01:54 +00:00
parent f291d21fb6
commit b560a8436a
2 changed files with 6 additions and 10 deletions
+2 -2
View File
@@ -175,9 +175,9 @@
<define name="ExcludeArch"> <define name="ExcludeArch">
<element name="ExcludeArch"> <element name="ExcludeArch">
<choice> <choice>
<value>i[3-6]86</value> <value>i686</value>
<value>x86_64</value> <value>x86_64</value>
<value>arm.*</value> <value>armv7l</value>
</choice> </choice>
</element> </element>
</define> </define>
+4 -8
View File
@@ -311,15 +311,11 @@ class Builder:
def build(self): def build(self):
"""Build the package in one shot.""" """Build the package in one shot."""
# excludeArch should accept regex.
# eg. <exludeArch>arm.*</exludeArch> armv7l, armv5te matches
# <exludeArch>i[3-6]86</exludeArch> i386, i486, i586, i686 matches
architecture = ctx.config.values.general.architecture architecture = ctx.config.values.general.architecture
for arch in self.spec.source.excludeArch: if architecture in self.spec.source.excludeArch:
if re.match(arch, architecture): raise ExcludedArchitectureException(
raise ExcludedArchitectureException( _("pspec.xml avoids this package from building for '%s'")
_("pspec.xml avoids this package from building for '%s'") % architecture)
% architecture)
ctx.ui.status(_("Building source package: %s") ctx.ui.status(_("Building source package: %s")
% self.spec.source.name) % self.spec.source.name)