[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4369/8267] wic: change location of .env files
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4369/8267] wic: change location of .env files
- Date: Sun, 17 Dec 2017 01:56:25 +0000 (UTC)
commit c01cc6ff241b4a808af8773970a9abe27ae4093e
Author: Ed Bartosh <ed bartosh linux intel com>
Date: Wed Jan 25 19:39:14 2017 +0200
wic: change location of .env files
Current location of .env files $STAGING_DIR/imagedata. It doesn't
depend on machine and be rewritten by the builds for different
machines.
Changed location to $STAGING_DIR/$MACHINE/imagedata to avoid .env
files to be rewritten.
(From OE-Core rev: 94245144f5cef344d90bc2a7b3267cdae9d192e4)
Signed-off-by: Ed Bartosh <ed bartosh linux intel com>
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/image.bbclass | 2 +-
meta/classes/image_types.bbclass | 2 +-
meta/lib/oeqa/selftest/wic.py | 3 ++-
meta/recipes-core/meta/wic-tools.bb | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 4d50601..e20e447 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -337,7 +337,7 @@ python do_rootfs_wicenv () {
return
stdir = d.getVar('STAGING_DIR')
- outdir = os.path.join(stdir, 'imgdata')
+ outdir = os.path.join(stdir, d.getVar('MACHINE'), 'imgdata')
bb.utils.mkdirhier(outdir)
basename = d.getVar('IMAGE_BASENAME')
with open(os.path.join(outdir, basename) + '.env', 'w') as envf:
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index 005d1e2..0e5f38a 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -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}/imgdata/" -e "${IMAGE_BASENAME}" -o
"$out/" ${WIC_CREATE_EXTRA_ARGS}
+ BUILDDIR="${TOPDIR}" wic create "$wks" --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -e
"${IMAGE_BASENAME}" -o "$out/" ${WIC_CREATE_EXTRA_ARGS}
mv "$out/$(basename "${wks%.wks}")"*.direct "$out${IMAGE_NAME_SUFFIX}.wic"
rm -rf "$out/"
}
diff --git a/meta/lib/oeqa/selftest/wic.py b/meta/lib/oeqa/selftest/wic.py
index 0a78659..9784a68 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -347,7 +347,8 @@ class Wic(oeSelfTest):
if image not in self.wicenv_cache:
self.assertEqual(0, bitbake('%s -c do_rootfs_wicenv' % image).status)
stdir = get_bb_var('STAGING_DIR', image)
- self.wicenv_cache[image] = os.path.join(stdir, 'imgdata')
+ machine = get_bb_var('MACHINE', image)
+ self.wicenv_cache[image] = os.path.join(stdir, machine, 'imgdata')
return self.wicenv_cache[image]
@testcase(1347)
diff --git a/meta/recipes-core/meta/wic-tools.bb b/meta/recipes-core/meta/wic-tools.bb
index 0a53b73..aa09c82 100644
--- a/meta/recipes-core/meta/wic-tools.bb
+++ b/meta/recipes-core/meta/wic-tools.bb
@@ -14,7 +14,7 @@ python do_build_sysroot () {
# Write environment variables used by wic
# to tmp/sysroots/<machine>/imgdata/wictools.env
- outdir = os.path.join(d.getVar('STAGING_DIR'), 'imgdata')
+ outdir = os.path.join(d.getVar('STAGING_DIR'), d.getVar('MACHINE'), 'imgdata')
bb.utils.mkdirhier(outdir)
with open(os.path.join(outdir, "wic-tools.env"), 'w') as envf:
for var in ('RECIPE_SYSROOT_NATIVE', 'STAGING_DATADIR', 'STAGING_LIBDIR'):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]