priority = property(get_priority, set_priority)
@property
- def supported_arches(self):
- return self.pkg.supported_arches
+ def arches(self):
+ """
+ Returns a list of all supported arches for this build
+ """
+ # If the package doesn't filter anything, report everything the distro supports
+ if not self.pkg.build_arches:
+ return self.distro.arches
+
+ # Handle the special case of "noarch"
+ if "noarch" in self.pkg.build_arches:
+ return ["noarch"]
+
+ # Otherwise we return all supported arches
+ return [arch for arch in self.distro.arches if arch in self.pkg.build_arches]
# Jobs
"""
Called after a build has been created and creates all jobs
"""
- arches = []
-
- # Collect all supported arches
- for arch in self.distro.arches:
- # Skip any unsupported arches
- #if self.pkg.supported_arches and not arch in self.pkg.supported_arches:
- # log.debug("Build %s does not support %s" % (self.pkg, arch))
- # continue
-
- arches.append(arch)
-
- # Check for noarch
- if not arches:
- if "noarch" in self.pkg.supported_arches:
- arches.append("noarch")
-
- # Raise an error if nothing is supported at all
- if not arches:
- raise RuntimeError("Build %s does not support any architectures" % self)
-
# Create the jobs
- for arch in arches:
+ for arch in self.arches:
self.backend.jobs.create(self, arch)
async def _job_finished(self, job):
recommends,
suggests,
size,
- supported_arches,
+ build_arches,
commit_id,
build_id,
build_host,
package.recommends,
package.suggests,
package.installsize,
- [], # XXX supported arches
+ package.build_arches,
commit,
None, # package.build_id,
package.buildhost,
return self.data.description
@property
- def supported_arches(self):
- return self.data.supported_arches
+ def build_arches(self):
+ return self.data.build_arches
@property
def size(self):