Add repo from current compose

This gets added together with the any repos from configuration.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2015-12-17 10:17:26 +00:00 committed by Dennis Gilmore
parent 7a965bcb83
commit 0222d4dc6d
1 changed files with 7 additions and 2 deletions

View File

@ -42,8 +42,13 @@ class ImageBuildPhase(PhaseBase):
image_conf["install_tree"] = translate_path(self.compose, self.compose.paths.compose.os_tree(arch, variant)) # ^
format = image_conf["format"] # transform format into right 'format' for image-build
image_conf["format"] = ",".join([x[0] for x in image_conf["format"]]) # 'docker,qcow2'
if image_conf.has_key("repos") and not isinstance(image_conf["repos"], str):
image_conf["repos"] = ",".join(image_conf["repos"]) # supply repos as str separated by , instead of list
repos = image_conf.get('repos', [])
if isinstance(repos, str):
repos = [repos]
repos.append(translate_path(self.compose, self.compose.paths.compose.os_tree(arch, variant)))
image_conf['repos'] = ",".join(repos) # supply repos as str separated by , instead of list
cmd = {
"format": format,
"image_conf": image_conf,