diff --git a/pisi-spec.rng b/pisi-spec.rng
index 183835d0..de41c129 100644
--- a/pisi-spec.rng
+++ b/pisi-spec.rng
@@ -175,9 +175,9 @@
- i[3-6]86
+ i686
x86_64
- arm.*
+ armv7l
diff --git a/pisi/operations/build.py b/pisi/operations/build.py
index f87e4289..94530bb8 100644
--- a/pisi/operations/build.py
+++ b/pisi/operations/build.py
@@ -311,15 +311,11 @@ class Builder:
def build(self):
"""Build the package in one shot."""
- # excludeArch should accept regex.
- # eg. arm.* armv7l, armv5te matches
- # i[3-6]86 i386, i486, i586, i686 matches
architecture = ctx.config.values.general.architecture
- for arch in self.spec.source.excludeArch:
- if re.match(arch, architecture):
- raise ExcludedArchitectureException(
- _("pspec.xml avoids this package from building for '%s'")
- % architecture)
+ if architecture in self.spec.source.excludeArch:
+ raise ExcludedArchitectureException(
+ _("pspec.xml avoids this package from building for '%s'")
+ % architecture)
ctx.ui.status(_("Building source package: %s")
% self.spec.source.name)