do not ad to image build and live tasks the variant if it is empty

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
This commit is contained in:
Dennis Gilmore 2016-02-18 22:00:04 -06:00 committed by Lubomír Sedlář
parent 466a0eb24f
commit b4a008f86a
2 changed files with 6 additions and 3 deletions

View File

@ -58,6 +58,7 @@ class ImageBuildPhase(PhaseBase):
repo = shortcuts.force_list(image_conf.get('repo', [])) repo = shortcuts.force_list(image_conf.get('repo', []))
extras = shortcuts.force_list(image_conf.pop('repo_from', [])) extras = shortcuts.force_list(image_conf.pop('repo_from', []))
if not variant.is_empty:
extras.append(variant.uid) extras.append(variant.uid)
for extra in extras: for extra in extras:

View File

@ -124,8 +124,10 @@ class LiveImagesPhase(PhaseBase):
if 'ksurl' in data: if 'ksurl' in data:
cmd['ksurl'] = resolve_git_url(data['ksurl']) cmd['ksurl'] = resolve_git_url(data['ksurl'])
cmd["repos"] = [translate_path( cmd["repos"] = []
self.compose, self.compose.paths.compose.repository(arch, variant, create_dir=False))] if not variant.is_empty:
cmd["repos"].append(translate_path(
self.compose, self.compose.paths.compose.repository(arch, variant, create_dir=False)))
# additional repos # additional repos
cmd["repos"].extend(data.get("additional_repos", [])) cmd["repos"].extend(data.get("additional_repos", []))