From c321bca8ef11ed436d77b926ea4a393299b53c2a Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mar 13 2016 16:18:08 +0000 Subject: image_build: fix subvariant handling Dennis added a 'subvariant' property to the Docker image config, but we weren't using it, we were just hard-coding the variant as the subvariant...and doing it wrong, as well, using the variant object rather than its uid property. This fixes both problems: we'll now use the explicitly set image config 'subvariant' property if there is one, otherwise we use the variant.uid as the subvariant. Note this is a high priority fix, as it broke F24 compose today. Signed-off-by: Adam Williamson --- diff --git a/pungi/phases/image_build.py b/pungi/phases/image_build.py index f1272a0..badf53e 100644 --- a/pungi/phases/image_build.py +++ b/pungi/phases/image_build.py @@ -229,9 +229,8 @@ class CreateImageBuildThread(WorkerThread): img.disc_number = 1 # We don't expect multiple disks img.disc_count = 1 img.bootable = False - img.subvariant = cmd["image_conf"]["image-build"]["variant"] - compose.im.add(variant=cmd["image_conf"]["image-build"]["variant"].uid, - arch=image_info['arch'], - image=img) + varname = cmd["image_conf"]["image-build"]["variant"].uid + img.subvariant = cmd["image_conf"]["image-build"].get("subvariant", varname) + compose.im.add(variant=varname, arch=image_info['arch'], image=img) self.pool.log_info("[DONE ] %s" % msg)