buildinstall: Fix treeinfo generating on failure
When buildinstall fails, there will be no lorax generated files copied into the compose directory. However they may still be mentioned in the .treefile in work/ subdirectory where lorax runs. To avoid possible issues, we should use the lorax created .treeinfo only if the run was successful. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
930c2f1a42
commit
61a3be2307
3 changed files with 14 additions and 13 deletions
|
|
@ -185,7 +185,7 @@ def write_compose_info(compose):
|
|||
compose.log_info("[DONE ] %s" % msg)
|
||||
|
||||
|
||||
def write_tree_info(compose, arch, variant, timestamp=None):
|
||||
def write_tree_info(compose, arch, variant, timestamp=None, bi=None):
|
||||
if variant.type in ("addon", ) or variant.is_empty:
|
||||
return
|
||||
|
||||
|
|
@ -288,7 +288,7 @@ def write_tree_info(compose, arch, variant, timestamp=None):
|
|||
self.release = LoraxProduct(self)
|
||||
|
||||
# images
|
||||
if variant.type == "variant":
|
||||
if variant.type == "variant" and bi.succeeded(variant, arch):
|
||||
os_tree = compose.paths.compose.os_tree(arch, variant)
|
||||
|
||||
# clone all but 'general' sections from buildinstall .treeinfo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue