summaryrefslogtreecommitdiffstats
path: root/scripts/lib/mic/utils/oe/misc.py
diff options
context:
space:
mode:
authorJoão Henrique Ferreira de Freitas <joaohf@gmail.com>2014-04-04 23:14:10 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-13 19:35:11 +0100
commitbc10da01f35ade81b68533ef5015a6def7c88d7c (patch)
tree9a6bdaede05b81b3fae8a87b38c9fe7e81dfe28a /scripts/lib/mic/utils/oe/misc.py
parent8387f1f00093e5c45f20bb4d4bc9bc6ef549a795 (diff)
downloadpoky-bc10da01f35ade81b68533ef5015a6def7c88d7c.tar.gz
wic: add find_artifact() to get a specific bitbake variable
This helper is used by source plugins to get specific bitbake variable. (From OE-Core rev: b8e51f73bc8e67ca60b7dd8d67091257aad62efd) Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/mic/utils/oe/misc.py')
-rw-r--r--scripts/lib/mic/utils/oe/misc.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/lib/mic/utils/oe/misc.py b/scripts/lib/mic/utils/oe/misc.py
index 5436a0a1fe..16c250aa9f 100644
--- a/scripts/lib/mic/utils/oe/misc.py
+++ b/scripts/lib/mic/utils/oe/misc.py
@@ -142,6 +142,20 @@ def find_bitbake_env_lines(image_name):
142 142
143 return bitbake_env_lines 143 return bitbake_env_lines
144 144
145def find_artifact(bitbake_env_lines, variable):
146 """
147 Gather the build artifact for the current image (the image_name
148 e.g. core-image-minimal) for the current MACHINE set in local.conf
149 """
150 retval = ""
151
152 for line in bitbake_env_lines.split('\n'):
153 if (get_line_val(line, variable)):
154 retval = get_line_val(line, variable)
155 break
156
157 return retval
158
145def get_line_val(line, key): 159def get_line_val(line, key):
146 """ 160 """
147 Extract the value from the VAR="val" string 161 Extract the value from the VAR="val" string