image.bbclass: put .env files to ${STAGING_DIR}/imgdata/

As STAGING_DIR_TARGET started to point to a recipe specific
sysroot wic is not able to add .env files when .wks file refers
to multiple rootfs recipes.

Used STAGING_DIR instead of STAGING_DIR_TARGET to make the
directory with .env files the same for all recipes.

(From OE-Core rev: 3797cfd7473d3f9b7c0d999dcf9cd9608c8c7c6c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ed Bartosh
2017-01-16 22:53:46 +02:00
committed by Richard Purdie
parent d781747102
commit dc4a612e60
3 changed files with 3 additions and 3 deletions

View File

@@ -342,7 +342,7 @@ python do_rootfs_wicenv () {
if not wicvars:
return
stdir = d.getVar('STAGING_DIR_TARGET')
stdir = d.getVar('STAGING_DIR')
outdir = os.path.join(stdir, 'imgdata')
bb.utils.mkdirhier(outdir)
basename = d.getVar('IMAGE_BASENAME')

View File

@@ -216,7 +216,7 @@ IMAGE_CMD_wic () {
bbfatal "No kickstart files from WKS_FILES were found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
fi
BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR_TARGET}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/" ${WIC_CREATE_EXTRA_ARGS}
BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/" ${WIC_CREATE_EXTRA_ARGS}
mv "$out/build/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic"
rm -rf "$out/"
}

View File

@@ -332,7 +332,7 @@ class Wic(oeSelfTest):
"""Generate and obtain the path to <image>.env"""
if image not in self.wicenv_cache:
self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' % image).status)
stdir = get_bb_var('STAGING_DIR_TARGET', image)
stdir = get_bb_var('STAGING_DIR', image)
self.wicenv_cache[image] = os.path.join(stdir, 'imgdata')
return self.wicenv_cache[image]