Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
"""
Creates a new build based on the given distribution and package
"""
+ # Fail if this is not a source package
+ if not package.is_source():
+ raise RuntimeError("Can only build source packages, not %s" % package.arch)
+
build = self._get_build("""
INSERT INTO
builds
def arch(self):
return self.data.arch
+ def is_source(self):
+ """
+ Returns True if this is a source package
+ """
+ return self.arch == "src"
+
@property
def nevra(self):
return "%s-%s.%s" % (self.name, self.evr, self.arch)