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

* [PATCH v3] wic: change location of .env files
  2017-01-25 17:06 [PATCH v2] wic: change location of .env files Ed Bartosh
@ 2017-01-25 17:39 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: Ed Bartosh @ 2017-01-25 17:39 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..ca69823 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

* ✗ patchtest: failure for wic: change location of .env files (rev2)
  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 ` Patchwork
  2017-01-25 18:23 ` ✗ patchtest: failure for wic: change location of .env files (rev3) Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-01-25 17:53 UTC (permalink / raw)
  To: Ed Bartosh; +Cc: openembedded-core

== Series Details ==

Series: wic: change location of .env files (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/4976/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 40463f9d80)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

* ✗ patchtest: failure for wic: change location of .env files (rev3)
  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 ` Patchwork
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2017-01-25 18:23 UTC (permalink / raw)
  To: Ed Bartosh; +Cc: openembedded-core

== Series Details ==

Series: wic: change location of .env files (rev3)
Revision: 3
URL   : https://patchwork.openembedded.org/series/4976/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 40463f9d80)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[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.