<div dir="ltr">Agreed. What if it was image_types_wic.bbclass and you did something similar to build_uboot() in image.bbclass?</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 30, 2017 at 10:15 AM, Ed Bartosh <span dir="ltr"><<a href="mailto:ed.bartosh@linux.intel.com" target="_blank">ed.bartosh@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Jan 30, 2017 at 10:25:59AM -0800, Rick Altherr wrote:<br>
> I'm not clear on which path is the preferred one. There are lots of bits<br>
> and pieces in image_types.bbclass that implement various image types.<br>
> uboot got added as a separate class at some point. The comments in<br>
> local.conf.sample.extended imply IMAGE_CLASSES should be used to load<br>
> additional image_types_* classes to add support for additional image<br>
> types. Having the wic image type implemented in a separate<br>
> image-wic.bbclass that is directly inherited by image.bbclass adds a 3rd<br>
> approach. Which one do we want contributors to use in the future?<br>
><br>
<br>
</span>I didn't want to create even more confusion. What I wanted is stated in the<br>
commit message - to put existing wic code into a file for better<br>
maintenance. If this is more confusing than having wic code in different<br>
places of image.class and image_types.class then we can just drop this<br>
patch. However, I personally find it more maintainable this way.<br>
<br>
Suggesting people to change machine configs just because wic code is<br>
moved to separate file doesn't look good to me either.<br>
<div class="HOEnZb"><div class="h5"><br>
> On Mon, Jan 30, 2017 at 9:45 AM, Ed Bartosh <<a href="mailto:ed.bartosh@linux.intel.com">ed.bartosh@linux.intel.com</a>><br>
> wrote:<br>
><br>
> > On Mon, Jan 30, 2017 at 09:47:42AM -0800, Rick Altherr wrote:<br>
> > > Hmm. In local.conf.sample.extended, I find:<br>
> > ><br>
> > > # Additional image generation features<br>
> > > #<br>
> > > # The following is a list of classes to import to use in the generation<br>
> > of<br>
> > > images<br>
> > > # currently an example class is image_types_uboot<br>
> > > # IMAGE_CLASSES = " image_types_uboot"<br>
> > ><br>
> > > Indeed, image_types_uboot isn't part of IMAGE_CLASSES by default. I'd<br>
> > > expect a machine config to add wic to IMAGE_CLASSES if it needs wic<br>
> > output.<br>
> > ><br>
> ><br>
> > So far all machine configs add wic to IMAGE_TYPES and it works just<br>
> > fine. Why to change?<br>
> ><br>
> > > On Mon, Jan 30, 2017 at 9:18 AM, Ed Bartosh <<a href="mailto:ed.bartosh@linux.intel.com">ed.bartosh@linux.intel.com</a>><br>
> > > wrote:<br>
> > ><br>
> > > > On Mon, Jan 30, 2017 at 09:27:54AM -0800, Rick Altherr wrote:<br>
> > > > > Why didn't you make this image_types_wic.bbclass and use<br>
> > IMAGE_CLASSES to<br>
> > > > > load it?<br>
> > > ><br>
> > > > Because of the following:<br>
> > > > - IMAGE_CLASSES[doc] = "A list of classes that all images should<br>
> > > > inherit." I'm not sure all images should include wic class. I'll<br>
> > probably<br>
> > > > make this inheritance conditional.<br>
> > > > - so far IMAGE_CLASSES is used for qemuboot, image_types,<br>
> > > > image_types_uboot and testimage,<br>
> > > > so the usage is more or less follows the description. wic is out of<br>
> > > > that usage scenario, I believe.<br>
> > > > - 'inherit image_wic' is more explicit than IMAGE_CLASSES +=<br>
> > > > "image_types"\n inherit ${IMAGE_CLASSES}<br>
> > > ><br>
> > > ><br>
> > > > ><br>
> > > > > On Fri, Jan 27, 2017 at 12:19 PM, Ed Bartosh <<br>
> > <a href="mailto:ed.bartosh@linux.intel.com">ed.bartosh@linux.intel.com</a><br>
> > > > ><br>
> > > > > wrote:<br>
> > > > ><br>
> > > > > > There is a lot of wic code in image.bbclass and image_types.bbclass<br>
> > > > > > Having all code separated in one file should make it more readable<br>
> > > > > > and easier to maintain.<br>
> > > > > ><br>
> > > > > > Signed-off-by: Ed Bartosh <<a href="mailto:ed.bartosh@linux.intel.com">ed.bartosh@linux.intel.com</a>><br>
> > > > > > ---<br>
> > > > > > meta/classes/image-wic.bbclass | 120<br>
> > ++++++++++++++++++++++++++++++<br>
> > > > > > +++++++++<br>
> > > > > > meta/classes/image.bbclass | 25 +-------<br>
> > > > > > meta/classes/image_types.<wbr>bbclass | 95<br>
> > ------------------------------<br>
> > > > -<br>
> > > > > > 3 files changed, 122 insertions(+), 118 deletions(-)<br>
> > > > > > create mode 100644 meta/classes/image-wic.bbclass<br>
> > > > > ><br>
> > > > > > diff --git a/meta/classes/image-wic.<wbr>bbclass<br>
> > b/meta/classes/image-wic.<br>
> > > > > > bbclass<br>
> > > > > > new file mode 100644<br>
> > > > > > index 0000000..2acfd65<br>
> > > > > > --- /dev/null<br>
> > > > > > +++ b/meta/classes/image-wic.<wbr>bbclass<br>
> > > > > > @@ -0,0 +1,120 @@<br>
> > > > > > +# The WICVARS variable is used to define list of bitbake variables<br>
> > > > used<br>
> > > > > > in wic code<br>
> > > > > > +# variables from this list is written to <image>.env file<br>
> > > > > > +WICVARS ?= "\<br>
> > > > > > + BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD<br>
> > HDDDIR<br>
> > > > > > IMAGE_BASENAME IMAGE_BOOT_FILES \<br>
> > > > > > + IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD<br>
> > > > ISODIR<br>
> > > > > > MACHINE_ARCH RECIPE_SYSROOT_NATIVE \<br>
> > > > > > + ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR<br>
> > > > > > TARGET_SYS"<br>
> > > > > > +<br>
> > > > > > +WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.<wbr>wks"<br>
> > > > > > +WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"<br>
> > > > > > +WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/<wbr>wic' % p for p in<br>
> > > > > > '${BBPATH}'.split(':'))}:${@':<wbr>'.join('%s/scripts/lib/wic/<br>
> > canned-wks'<br>
> > > > % l<br>
> > > > > > for l in '${BBPATH}:${COREBASE}'.split(<wbr>':'))}"<br>
> > > > > > +WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.<wbr>split(),<br>
> > > > > > '${WKS_SEARCH_PATH}') or ''}"<br>
> > > > > > +<br>
> > > > > > +def wks_search(files, search_path):<br>
> > > > > > + for f in files:<br>
> > > > > > + if os.path.isabs(f):<br>
> > > > > > + if os.path.exists(f):<br>
> > > > > > + return f<br>
> > > > > > + else:<br>
> > > > > > + searched = bb.utils.which(search_path, f)<br>
> > > > > > + if searched:<br>
> > > > > > + return searched<br>
> > > > > > +<br>
> > > > > > +WIC_CREATE_EXTRA_ARGS ?= ""<br>
> > > > > > +<br>
> > > > > > +IMAGE_CMD_wic () {<br>
> > > > > > + out="${IMGDEPLOYDIR}/${IMAGE_<wbr>NAME}"<br>
> > > > > > + wks="${WKS_FULL_PATH}"<br>
> > > > > > + if [ -z "$wks" ]; then<br>
> > > > > > + bbfatal "No kickstart files from WKS_FILES were<br>
> > found:<br>
> > > > > > ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."<br>
> > > > > > + fi<br>
> > > > > > +<br>
> > > > > > + BUILDDIR="${TOPDIR}" wic create "$wks" --vars<br>
> > > > > > "${STAGING_DIR}/${MACHINE}/<wbr>imgdata/" -e "${IMAGE_BASENAME}" -o<br>
> > "$out/"<br>
> > > > > > ${WIC_CREATE_EXTRA_ARGS}<br>
> > > > > > + mv "$out/$(basename "${wks%.wks}")"*.direct<br>
> > > > > > "$out${IMAGE_NAME_SUFFIX}.wic"<br>
> > > > > > + rm -rf "$out/"<br>
> > > > > > +}<br>
> > > > > > +IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"<br>
> > > > > > +<br>
> > > > > > +# Rebuild when the wks file or vars in WICVARS change<br>
> > > > > > +USING_WIC = "${@bb.utils.contains_any('<wbr>IMAGE_FSTYPES', 'wic ' + '<br>
> > > > > > '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1',<br>
> > '',<br>
> > > > d)}"<br>
> > > > > > +WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' %<br>
> > > > > > os.path.exists('${WKS_FULL_<wbr>PATH}') if '${USING_WIC}' else ''}"<br>
> > > > > > +do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"<br>
> > > > > > +do_image_wic[depends] += "wic-tools:do_build"<br>
> > > > > > +<br>
> > > > > > +python () {<br>
> > > > > > + if d.getVar('USING_WIC') and 'do_bootimg' in d:<br>
> > > > > > + bb.build.addtask('do_image_<wbr>wic', '', 'do_bootimg', d)<br>
> > > > > > +}<br>
> > > > > > +<br>
> > > > > > +python do_write_wks_template () {<br>
> > > > > > + """Write out expanded template contents to WKS_FULL_PATH."""<br>
> > > > > > + import re<br>
> > > > > > +<br>
> > > > > > + template_body = d.getVar('_WKS_TEMPLATE')<br>
> > > > > > +<br>
> > > > > > + # Remove any remnant variable references left behind by the<br>
> > > > expansion<br>
> > > > > > + # due to undefined variables<br>
> > > > > > + expand_var_regexp = re.compile(r"\${[^{}@\n\t :]+}")<br>
> > > > > > + while True:<br>
> > > > > > + new_body = re.sub(expand_var_regexp, '', template_body)<br>
> > > > > > + if new_body == template_body:<br>
> > > > > > + break<br>
> > > > > > + else:<br>
> > > > > > + template_body = new_body<br>
> > > > > > +<br>
> > > > > > + wks_file = d.getVar('WKS_FULL_PATH')<br>
> > > > > > + with open(wks_file, 'w') as f:<br>
> > > > > > + f.write(template_body)<br>
> > > > > > +}<br>
> > > > > > +<br>
> > > > > > +python () {<br>
> > > > > > + if d.getVar('USING_WIC'):<br>
> > > > > > + wks_file_u = d.getVar('WKS_FULL_PATH', False)<br>
> > > > > > + wks_file = d.expand(wks_file_u)<br>
> > > > > > + base, ext = os.path.splitext(wks_file)<br>
> > > > > > + if ext == '.in' and os.path.exists(wks_file):<br>
> > > > > > + wks_out_file = os.path.join(d.getVar('<wbr>WORKDIR'),<br>
> > > > > > os.path.basename(base))<br>
> > > > > > + d.setVar('WKS_FULL_PATH', wks_out_file)<br>
> > > > > > + d.setVar('WKS_TEMPLATE_PATH', wks_file_u)<br>
> > > > > > + d.setVar('WKS_FILE_CHECKSUM',<br>
> > '${WKS_TEMPLATE_PATH}:True')<br>
> > > > > > +<br>
> > > > > > + # We need to re-parse each time the file changes, and<br>
> > > > bitbake<br>
> > > > > > + # needs to be told about that explicitly.<br>
> > > > > > + bb.parse.mark_dependency(d, wks_file)<br>
> > > > > > +<br>
> > > > > > + try:<br>
> > > > > > + with open(wks_file, 'r') as f:<br>
> > > > > > + body = f.read()<br>
> > > > > > + except (IOError, OSError) as exc:<br>
> > > > > > + pass<br>
> > > > > > + else:<br>
> > > > > > + # Previously, I used expandWithRefs to get the<br>
> > > > dependency<br>
> > > > > > list<br>
> > > > > > + # and add it to WICVARS, but there's no point<br>
> > > > re-parsing<br>
> > > > > > the<br>
> > > > > > + # file in process_wks_template as well, so just<br>
> > put<br>
> > > > it in<br>
> > > > > > + # a variable and let the metadata deal with the<br>
> > deps.<br>
> > > > > > + d.setVar('_WKS_TEMPLATE', body)<br>
> > > > > > + bb.build.addtask('do_write_<wbr>wks_template',<br>
> > > > > > 'do_image_wic', None, d)<br>
> > > > > > +}<br>
> > > > > > +<br>
> > > > > > +#<br>
> > > > > > +# Write environment variables used by wic<br>
> > > > > > +# to tmp/sysroots/<machine>/<wbr>imgdata/<image>.env<br>
> > > > > > +#<br>
> > > > > > +python do_rootfs_wicenv () {<br>
> > > > > > + wicvars = d.getVar('WICVARS')<br>
> > > > > > + if not wicvars:<br>
> > > > > > + return<br>
> > > > > > +<br>
> > > > > > + stdir = d.getVar('STAGING_DIR')<br>
> > > > > > + outdir = os.path.join(stdir, d.getVar('MACHINE'), 'imgdata')<br>
> > > > > > + bb.utils.mkdirhier(outdir)<br>
> > > > > > + basename = d.getVar('IMAGE_BASENAME')<br>
> > > > > > + with open(os.path.join(outdir, basename) + '.env', 'w') as<br>
> > envf:<br>
> > > > > > + for var in wicvars.split():<br>
> > > > > > + value = d.getVar(var)<br>
> > > > > > + if value:<br>
> > > > > > + envf.write('%s="%s"\n' % (var, value.strip()))<br>
> > > > > > +}<br>
> > > > > > +addtask do_rootfs_wicenv after do_image before do_image_wic<br>
> > > > > > +do_rootfs_wicenv[vardeps] += "${WICVARS}"<br>
> > > > > > +do_rootfs_wicenv[prefuncs] = 'set_image_size'<br>
> > > > > > diff --git a/meta/classes/image.bbclass<br>
> > b/meta/classes/image.bbclass<br>
> > > > > > index 13fd996..1a549e9 100644<br>
> > > > > > --- a/meta/classes/image.bbclass<br>
> > > > > > +++ b/meta/classes/image.bbclass<br>
> > > > > > @@ -192,6 +192,8 @@ python () {<br>
> > > > > > IMAGE_CLASSES += "image_types"<br>
> > > > > > inherit ${IMAGE_CLASSES}<br>
> > > > > ><br>
> > > > > > +inherit image-wic<br>
> > > > > > +<br>
> > > > > > IMAGE_POSTPROCESS_COMMAND ?= ""<br>
> > > > > ><br>
> > > > > > # some default locales<br>
> > > > > > @@ -332,29 +334,6 @@ fakeroot python do_image_qa () {<br>
> > > > > > }<br>
> > > > > > addtask do_image_qa after do_image_complete before do_build<br>
> > > > > ><br>
> > > > > > -#<br>
> > > > > > -# Write environment variables used by wic<br>
> > > > > > -# to tmp/sysroots/<machine>/<wbr>imgdata/<image>.env<br>
> > > > > > -#<br>
> > > > > > -python do_rootfs_wicenv () {<br>
> > > > > > - wicvars = d.getVar('WICVARS')<br>
> > > > > > - if not wicvars:<br>
> > > > > > - return<br>
> > > > > > -<br>
> > > > > > - stdir = d.getVar('STAGING_DIR')<br>
> > > > > > - outdir = os.path.join(stdir, d.getVar('MACHINE'), 'imgdata')<br>
> > > > > > - bb.utils.mkdirhier(outdir)<br>
> > > > > > - basename = d.getVar('IMAGE_BASENAME')<br>
> > > > > > - with open(os.path.join(outdir, basename) + '.env', 'w') as<br>
> > envf:<br>
> > > > > > - for var in wicvars.split():<br>
> > > > > > - value = d.getVar(var)<br>
> > > > > > - if value:<br>
> > > > > > - envf.write('%s="%s"\n' % (var, value.strip()))<br>
> > > > > > -}<br>
> > > > > > -addtask do_rootfs_wicenv after do_image before do_image_wic<br>
> > > > > > -do_rootfs_wicenv[vardeps] += "${WICVARS}"<br>
> > > > > > -do_rootfs_wicenv[prefuncs] = 'set_image_size'<br>
> > > > > > -<br>
> > > > > > def setup_debugfs_variables(d):<br>
> > > > > > d.appendVar('IMAGE_ROOTFS', '-dbg')<br>
> > > > > > d.appendVar('IMAGE_LINK_NAME', '-dbg')<br>
> > > > > > diff --git a/meta/classes/image_types.<wbr>bbclass<br>
> > > > b/meta/classes/image_types.<br>
> > > > > > bbclass<br>
> > > > > > index ad95dc6..e2ecf93 100644<br>
> > > > > > --- a/meta/classes/image_types.<wbr>bbclass<br>
> > > > > > +++ b/meta/classes/image_types.<wbr>bbclass<br>
> > > > > > @@ -192,97 +192,6 @@ IMAGE_CMD_ubi () {<br>
> > > > > ><br>
> > > > > > IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o<br>
> > > > > > ${IMGDEPLOYDIR}/${IMAGE_NAME}$<wbr>{IMAGE_NAME_SUFFIX}.ubifs<br>
> > > > ${MKUBIFS_ARGS}"<br>
> > > > > ><br>
> > > > > > -WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.<wbr>wks"<br>
> > > > > > -WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"<br>
> > > > > > -WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/<wbr>wic' % p for p in<br>
> > > > > > '${BBPATH}'.split(':'))}:${@':<wbr>'.join('%s/scripts/lib/wic/<br>
> > canned-wks'<br>
> > > > % l<br>
> > > > > > for l in '${BBPATH}:${COREBASE}'.split(<wbr>':'))}"<br>
> > > > > > -WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.<wbr>split(),<br>
> > > > > > '${WKS_SEARCH_PATH}') or ''}"<br>
> > > > > > -<br>
> > > > > > -def wks_search(files, search_path):<br>
> > > > > > - for f in files:<br>
> > > > > > - if os.path.isabs(f):<br>
> > > > > > - if os.path.exists(f):<br>
> > > > > > - return f<br>
> > > > > > - else:<br>
> > > > > > - searched = bb.utils.which(search_path, f)<br>
> > > > > > - if searched:<br>
> > > > > > - return searched<br>
> > > > > > -<br>
> > > > > > -WIC_CREATE_EXTRA_ARGS ?= ""<br>
> > > > > > -<br>
> > > > > > -IMAGE_CMD_wic () {<br>
> > > > > > - out="${IMGDEPLOYDIR}/${IMAGE_<wbr>NAME}"<br>
> > > > > > - wks="${WKS_FULL_PATH}"<br>
> > > > > > - if [ -z "$wks" ]; then<br>
> > > > > > - bbfatal "No kickstart files from WKS_FILES were<br>
> > found:<br>
> > > > > > ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."<br>
> > > > > > - fi<br>
> > > > > > -<br>
> > > > > > - BUILDDIR="${TOPDIR}" wic create "$wks" --vars<br>
> > > > > > "${STAGING_DIR}/${MACHINE}/<wbr>imgdata/" -e "${IMAGE_BASENAME}" -o<br>
> > "$out/"<br>
> > > > > > ${WIC_CREATE_EXTRA_ARGS}<br>
> > > > > > - mv "$out/$(basename "${wks%.wks}")"*.direct<br>
> > > > > > "$out${IMAGE_NAME_SUFFIX}.wic"<br>
> > > > > > - rm -rf "$out/"<br>
> > > > > > -}<br>
> > > > > > -IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"<br>
> > > > > > -<br>
> > > > > > -# Rebuild when the wks file or vars in WICVARS change<br>
> > > > > > -USING_WIC = "${@bb.utils.contains_any('<wbr>IMAGE_FSTYPES', 'wic ' + '<br>
> > > > > > '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1',<br>
> > '',<br>
> > > > d)}"<br>
> > > > > > -WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' %<br>
> > > > > > os.path.exists('${WKS_FULL_<wbr>PATH}') if '${USING_WIC}' else ''}"<br>
> > > > > > -do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"<br>
> > > > > > -do_image_wic[depends] += "wic-tools:do_build"<br>
> > > > > > -<br>
> > > > > > -python () {<br>
> > > > > > - if d.getVar('USING_WIC') and 'do_bootimg' in d:<br>
> > > > > > - bb.build.addtask('do_image_<wbr>wic', '', 'do_bootimg', d)<br>
> > > > > > -}<br>
> > > > > > -<br>
> > > > > > -python do_write_wks_template () {<br>
> > > > > > - """Write out expanded template contents to WKS_FULL_PATH."""<br>
> > > > > > - import re<br>
> > > > > > -<br>
> > > > > > - template_body = d.getVar('_WKS_TEMPLATE')<br>
> > > > > > -<br>
> > > > > > - # Remove any remnant variable references left behind by the<br>
> > > > expansion<br>
> > > > > > - # due to undefined variables<br>
> > > > > > - expand_var_regexp = re.compile(r"\${[^{}@\n\t :]+}")<br>
> > > > > > - while True:<br>
> > > > > > - new_body = re.sub(expand_var_regexp, '', template_body)<br>
> > > > > > - if new_body == template_body:<br>
> > > > > > - break<br>
> > > > > > - else:<br>
> > > > > > - template_body = new_body<br>
> > > > > > -<br>
> > > > > > - wks_file = d.getVar('WKS_FULL_PATH')<br>
> > > > > > - with open(wks_file, 'w') as f:<br>
> > > > > > - f.write(template_body)<br>
> > > > > > -}<br>
> > > > > > -<br>
> > > > > > -python () {<br>
> > > > > > - if d.getVar('USING_WIC'):<br>
> > > > > > - wks_file_u = d.getVar('WKS_FULL_PATH', False)<br>
> > > > > > - wks_file = d.expand(wks_file_u)<br>
> > > > > > - base, ext = os.path.splitext(wks_file)<br>
> > > > > > - if ext == '.in' and os.path.exists(wks_file):<br>
> > > > > > - wks_out_file = os.path.join(d.getVar('<wbr>WORKDIR'),<br>
> > > > > > os.path.basename(base))<br>
> > > > > > - d.setVar('WKS_FULL_PATH', wks_out_file)<br>
> > > > > > - d.setVar('WKS_TEMPLATE_PATH', wks_file_u)<br>
> > > > > > - d.setVar('WKS_FILE_CHECKSUM',<br>
> > '${WKS_TEMPLATE_PATH}:True')<br>
> > > > > > -<br>
> > > > > > - # We need to re-parse each time the file changes, and<br>
> > > > bitbake<br>
> > > > > > - # needs to be told about that explicitly.<br>
> > > > > > - bb.parse.mark_dependency(d, wks_file)<br>
> > > > > > -<br>
> > > > > > - try:<br>
> > > > > > - with open(wks_file, 'r') as f:<br>
> > > > > > - body = f.read()<br>
> > > > > > - except (IOError, OSError) as exc:<br>
> > > > > > - pass<br>
> > > > > > - else:<br>
> > > > > > - # Previously, I used expandWithRefs to get the<br>
> > > > dependency<br>
> > > > > > list<br>
> > > > > > - # and add it to WICVARS, but there's no point<br>
> > > > re-parsing<br>
> > > > > > the<br>
> > > > > > - # file in process_wks_template as well, so just<br>
> > put<br>
> > > > it in<br>
> > > > > > - # a variable and let the metadata deal with the<br>
> > deps.<br>
> > > > > > - d.setVar('_WKS_TEMPLATE', body)<br>
> > > > > > - bb.build.addtask('do_write_<wbr>wks_template',<br>
> > > > > > 'do_image_wic', None, d)<br>
> > > > > > -}<br>
> > > > > > -<br>
> > > > > > EXTRA_IMAGECMD = ""<br>
> > > > > ><br>
> > > > > > inherit siteinfo<br>
> > > > > > @@ -380,7 +289,3 @@ IMAGE_EXTENSION_live = "hddimg iso"<br>
> > > > > > # The IMAGE_TYPES_MASKED variable will be used to mask out from<br>
> > the<br>
> > > > > > IMAGE_FSTYPES,<br>
> > > > > > # images that will not be built at do_rootfs time: vmdk, vdi,<br>
> > qcow2,<br>
> > > > > > hdddirect, hddimg, iso, etc.<br>
> > > > > > IMAGE_TYPES_MASKED ?= ""<br>
> > > > > > -<br>
> > > > > > -# The WICVARS variable is used to define list of bitbake variables<br>
> > > > used<br>
> > > > > > in wic code<br>
> > > > > > -# variables from this list is written to <image>.env file<br>
> > > > > > -WICVARS ?= "BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD<br>
> > HDDDIR<br>
> > > > > > IMAGE_BASENAME IMAGE_BOOT_FILES IMAGE_LINK_NAME IMAGE_ROOTFS<br>
> > > > > > INITRAMFS_FSTYPES INITRD ISODIR MACHINE_ARCH RECIPE_SYSROOT_NATIVE<br>
> > > > > > ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR TARGET_SYS"<br>
> > > > > > --<br>
> > > > > > 2.1.4<br>
> > > > > ><br>
> > > > > > --<br>
> > > > > > ______________________________<wbr>_________________<br>
> > > > > > Openembedded-core mailing list<br>
> > > > > > <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
> > > > > > <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
> > > > > ><br>
> > > ><br>
> > > > --<br>
> > > > --<br>
> > > > Regards,<br>
> > > > Ed<br>
> > > ><br>
> ><br>
> > --<br>
> > --<br>
> > Regards,<br>
> > Ed<br>
> ><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
--<br>
Regards,<br>
Ed<br>
</font></span></blockquote></div><br></div>