All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] wic: change location of .env files
@ 2017-01-25 17:06 Ed Bartosh
  2017-01-25 17:39 ` [PATCH v3] " Ed Bartosh
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ed Bartosh @ 2017-01-25 17:06 UTC (permalink / raw)
  To: openembedded-core

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.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 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 fb0cce3..2c58f4b 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -343,7 +343,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 ddd52f1..e391f8b 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 8295b40..8864af6 100644
--- a/meta/lib/oeqa/selftest/wic.py
+++ b/meta/lib/oeqa/selftest/wic.py
@@ -344,7 +344,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'):
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-25 18:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-25 17:06 [PATCH v2] wic: change location of .env files Ed Bartosh
2017-01-25 17:39 ` [PATCH v3] " Ed Bartosh
2017-01-25 17:53 ` ✗ patchtest: failure for wic: change location of .env files (rev2) Patchwork
2017-01-25 18:23 ` ✗ patchtest: failure for wic: change location of .env files (rev3) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.