aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-16 10:32:44 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-19 16:35:37 +0000
commit606f9e2d7d8d389c8d4f5c3090139d3bb780e09c (patch)
tree28b0a463d43886d9ae40d01c1ff27c8fc24b2db0 /meta/classes/image.bbclass
parentfbdf977a8094bb1e0baca85ffb3ed7f326986639 (diff)
downloadopenembedded-core-contrib-606f9e2d7d8d389c8d4f5c3090139d3bb780e09c.tar.gz
openembedded-core-contrib-606f9e2d7d8d389c8d4f5c3090139d3bb780e09c.tar.bz2
openembedded-core-contrib-606f9e2d7d8d389c8d4f5c3090139d3bb780e09c.zip
image: Fix wic environment issues
The wic environment function needs to run after the rootfs size is setup. We move this code to a specific task, and depend on that task from the wic images and other places its needed. This fixes: ====================================================================== FAIL: test_image_env (oeqa.selftest.wic.Wic) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/decorators.py", line 106, in wrapped_f return func(*args, **kwargs) File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/wic.py", line 218, in test_image_env self.assertTrue(var in content, "%s is not in .env file" % var) AssertionError: False is not true : ROOTFS_SIZE is not in .env file Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index cc8a23c526..13b77c9638 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -242,8 +242,6 @@ fakeroot python do_image () {
pre_process_cmds = d.getVar("IMAGE_PREPROCESS_COMMAND", True)
execute_pre_post_process(d, pre_process_cmds)
-
- write_wic_env(d)
}
do_image[dirs] = "${TOPDIR}"
do_image[umask] = "022"
@@ -264,7 +262,7 @@ addtask do_image_complete after do_image before do_build
# Write environment variables used by wic
# to tmp/sysroots/<machine>/imgdata/<image>.env
#
-def write_wic_env(d):
+python do_rootfs_wicenv () {
wicvars = d.getVar('WICVARS', True)
if not wicvars:
return
@@ -278,6 +276,10 @@ def write_wic_env(d):
value = d.getVar(var, True)
if value:
envf.write('%s="%s"\n' % (var, value.strip()))
+}
+addtask do_rootfs_wicenv after do_rootfs before do_image_wic
+do_rootfs_wicenv[vardeps] += "${WICVARS}"
+do_rootfs_wicenv[prefuncs] = 'set_image_size'
def setup_debugfs_variables(d):
d.appendVar('IMAGE_ROOTFS', '-dbg')