summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-18 11:04:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-20 16:55:15 +0100
commita052caed563a09a01f5a3ea1f0477f379c05bee0 (patch)
treeec0132f0b886fb8fb80a451beac3eb734739faf9 /meta/classes/image.bbclass
parent9b6cda7ff443eebfc5a5a8c9442c93a881807dab (diff)
downloadopenembedded-core-contrib-a052caed563a09a01f5a3ea1f0477f379c05bee0.tar.gz
image/image-live: Improve handling of live/iso/hddimg types (drop NOISO/NOHDD)
The logic can be improved and the historical NOISO/NOHDD variables moved into the class and out of common code. The variables are also then removed in favour of directly controlling the behaviour from IMAGE_FSTYPES in line with all the other image types. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass10
1 files changed, 1 insertions, 9 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index b1132b420e..f056ca5970 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -1,11 +1,3 @@
-def build_live(d):
- if bb.utils.contains("IMAGE_FSTYPES", "live", "live", "0", d) == "0": # live is not set but hob might set iso or hddimg
- d.setVar('NOISO', bb.utils.contains('IMAGE_FSTYPES', "iso", "0", "1", d))
- d.setVar('NOHDD', bb.utils.contains('IMAGE_FSTYPES', "hddimg", "0", "1", d))
- if d.getVar('NOISO') == "0" or d.getVar('NOHDD') == "0":
- return "image-live"
- return ""
- return "image-live"
IMAGE_CLASSES ??= ""
@@ -18,7 +10,7 @@ IMGCLASSES = "rootfs_${IMAGE_PKGTYPE} image_types ${IMAGE_CLASSES}"
# Only Linux SDKs support populate_sdk_ext, fall back to populate_sdk_base
# in the non-Linux SDK_OS case, such as mingw32
IMGCLASSES += "${@['populate_sdk_base', 'populate_sdk_ext']['linux' in d.getVar("SDK_OS")]}"
-IMGCLASSES += "${@build_live(d)}"
+IMGCLASSES += "${@bb.utils.contains_any('IMAGE_FSTYPES', 'live iso hddimg', 'image-live', '', d)}"
IMGCLASSES += "${@bb.utils.contains('IMAGE_FSTYPES', 'container', 'image-container', '', d)}"
IMGCLASSES += "image_types_wic"
IMGCLASSES += "${@oe.utils.conditional('TEST_IMAGE', '1', 'testimage-auto', '', d)}"