wic: change location of .env files
PATCH v2 1/1 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.
--- 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(-)
meta/classes/image.bbclass +1 -1
@@ -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:
meta/classes/image_types.bbclass +1 -1
@@ -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/" }
meta/lib/oeqa/selftest/wic.py +2 -1
@@ -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)
meta/recipes-core/meta/wic-tools.bb +1 -1
@@ -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'):
Signature · 1 line
2.1.4
✗ patchtest: failure for wic: change location of .env files (rev2)
== 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 ([email protected]) 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
PATCH v3 1/1 wic: change location of .env files
In reply to Ed BartoshCurrent 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.
--- 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(-)
meta/classes/image.bbclass +1 -1
@@ -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:
meta/classes/image_types.bbclass +1 -1
@@ -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/" }
meta/lib/oeqa/selftest/wic.py +2 -1
@@ -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)
meta/recipes-core/meta/wic-tools.bb +1 -1
@@ -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'):
Signature · 1 line
2.1.4
✗ patchtest: failure for wic: change location of .env files (rev3)
In reply to Ed Bartosh== 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 ([email protected]) 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