Do not build module-build-macros when all the components will be reused from previous module build.

This commit is contained in:
Jan Kaluza
2017-04-22 06:57:55 +02:00
parent 297d72c1e1
commit 024877592c
9 changed files with 15947 additions and 62 deletions

View File

@@ -133,6 +133,26 @@ class ModuleBuild(MBSBase):
if component.batch == self.batch
]
def up_to_current_batch(self, state=None):
"""
Returns all components of this module in the current batch and
in the previous batches.
"""
if not self.batch:
raise ValueError("No batch is in progress: %r" % self.batch)
if state != None:
return [
component for component in self.component_builds
if component.batch <= self.batch and component.state == state
]
else:
return [
component for component in self.component_builds
if component.batch <= self.batch
]
def mmd(self):
mmd = _modulemd.ModuleMetadata()
try: