summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-03-07 18:07:52 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-07 17:17:43 +0000
commit26ee4ddc653d97f5c436c66a8504493209e3c65e (patch)
tree8366ab405083d255ef0aca4473aa6f1482429166 /meta/classes/image.bbclass
parente43fcdf1e83a95e9ee6382dec042d72213fdc600 (diff)
downloadpoky-26ee4ddc653d97f5c436c66a8504493209e3c65e.tar.gz
image creation: allow overriding .rootfs suffix
By default, the image file name contains ".rootfs" to distinguish the image file from other files created during image building. However, for certain image types (for example, .hddimg) the ".rootfs" suffix is redundant because the type suffix alone already uniquely identifies the main image file (core-image-minimal-intel-corei7-64.hddimg instead of core-image-minimal-intel-corei7-64.rootfs.hddimg). With this change, distros that prefer the shorter image name can override the .rootfs suffix unconditionally with IMAGE_NAME_SUFFIX ?= '' in their distro configuration or with some condition check like this: python () { if <whole-disk image format active>: d.setVar('IMAGE_NAME_SUFFIX', '') } The exact logic when to remove the extra suffix depends on the distro and how it enables its own image type. (From OE-Core rev: 380ee36811939d947024bf78de907e3c071b834f) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 02612ad2a2..081a0b32c6 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -387,7 +387,7 @@ python () {
387 subimages.append(realt + "." + ctype) 387 subimages.append(realt + "." + ctype)
388 388
389 if realt not in alltypes: 389 if realt not in alltypes:
390 cmds.append(localdata.expand("\trm ${IMAGE_NAME}.rootfs.${type}")) 390 cmds.append(localdata.expand("\trm ${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}"))
391 else: 391 else:
392 subimages.append(realt) 392 subimages.append(realt)
393 393
@@ -474,7 +474,7 @@ python create_symlinks() {
474 manifest_name = d.getVar('IMAGE_MANIFEST', True) 474 manifest_name = d.getVar('IMAGE_MANIFEST', True)
475 taskname = d.getVar("BB_CURRENTTASK", True) 475 taskname = d.getVar("BB_CURRENTTASK", True)
476 subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split() 476 subimages = (d.getVarFlag("do_" + taskname, 'subimages', False) or "").split()
477 imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix', True) or ".rootfs." 477 imgsuffix = d.getVarFlag("do_" + taskname, 'imgsuffix', True) or "${IMAGE_NAME_SUFFIX}."
478 os.chdir(deploy_dir) 478 os.chdir(deploy_dir)
479 479
480 if not link_name: 480 if not link_name: