aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/image.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index 9580562580..f0843de928 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -335,13 +335,17 @@ class Image(ImageDepGraph):
Write environment variables used by wic
to tmp/sysroots/<machine>/imgdata/<image>.env
"""
+ wicvars = self.d.getVar('WICVARS', True)
+ if not wicvars:
+ return
+
stdir = self.d.getVar('STAGING_DIR_TARGET', True)
outdir = os.path.join(stdir, 'imgdata')
if not os.path.exists(outdir):
os.makedirs(outdir)
basename = self.d.getVar('IMAGE_BASENAME', True)
with open(os.path.join(outdir, basename) + '.env', 'w') as envf:
- for var in self.d.getVar('WICVARS', True).split():
+ for var in wicvars.split():
value = self.d.getVar(var, True)
if value:
envf.write('%s="%s"\n' % (var, value.strip()))