summaryrefslogtreecommitdiffstats
path: root/scripts/lib/image
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2014-02-03 19:16:55 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-04 12:57:35 +0000
commit3cb93017e64b409e887e37f255ae49bb4e274465 (patch)
tree61258e6b8d6f99c2ffc19e444ad516a00d6e00bc /scripts/lib/image
parent534d9ba70a44ad601a242ed09093d21cd3f032f1 (diff)
downloadast2050-yocto-poky-3cb93017e64b409e887e37f255ae49bb4e274465.zip
ast2050-yocto-poky-3cb93017e64b409e887e37f255ae49bb4e274465.tar.gz
wic: Create and use new functions for getting bitbake variables
Add get_bitbake_var() and bitbake_env_lines() functions for use by plugins, which will need access to them for customization. (From OE-Core rev: f0bb47b0d7ab6520c105ce131844269172de3efd) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/image')
-rw-r--r--scripts/lib/image/engine.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py
index 0e8b89e..2dd98b9 100644
--- a/scripts/lib/image/engine.py
+++ b/scripts/lib/image/engine.py
@@ -60,16 +60,26 @@ def verify_build_env():
return True
-def find_artifacts(image_name):
+def find_bitbake_env_lines(image_name):
"""
- Gather the build artifacts for the current image (the image_name
- e.g. core-image-minimal) for the current MACHINE set in local.conf
+ If image_name is empty, plugins might still be able to use the
+ environment, so set it regardless.
"""
bitbake_env_cmd = "bitbake -e %s" % image_name
rc, bitbake_env_lines = exec_cmd(bitbake_env_cmd)
if rc != 0:
- print "Couldn't get '%s' output, exiting." % bitbake_env_cmd
- sys.exit(1)
+ print "Couldn't get '%s' output." % bitbake_env_cmd
+ return None
+
+ return bitbake_env_lines
+
+
+def find_artifacts(image_name):
+ """
+ Gather the build artifacts for the current image (the image_name
+ e.g. core-image-minimal) for the current MACHINE set in local.conf
+ """
+ bitbake_env_lines = get_bitbake_env_lines()
rootfs_dir = kernel_dir = hdddir = staging_data_dir = native_sysroot = ""
OpenPOWER on IntegriCloud