summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoão Henrique Ferreira de Freitas <joaohf@gmail.com>2014-04-04 23:14:09 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-13 19:35:11 +0100
commit8387f1f00093e5c45f20bb4d4bc9bc6ef549a795 (patch)
treee1f7766ad8a3c8995088e27d0d79ceef0d217e78 /scripts
parentbf7364ec9bc2cd0aabb075e96e54161c2a8cb791 (diff)
downloadpoky-8387f1f00093e5c45f20bb4d4bc9bc6ef549a795.tar.gz
wic: Move find_bitbake_env_line() to oe.misc
Move find_bitbake_env_line() since they're going to need to be accessible from source plugins. (From OE-Core rev: d881ec6136255fd0f4a8cf36f9ce148ade02c103) 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')
-rw-r--r--scripts/lib/image/engine.py17
-rw-r--r--scripts/lib/mic/utils/oe/misc.py16
2 files changed, 16 insertions, 17 deletions
diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py
index 0643780f1a..311737a5c0 100644
--- a/scripts/lib/image/engine.py
+++ b/scripts/lib/image/engine.py
@@ -60,23 +60,6 @@ def verify_build_env():
60 return True 60 return True
61 61
62 62
63def find_bitbake_env_lines(image_name):
64 """
65 If image_name is empty, plugins might still be able to use the
66 environment, so set it regardless.
67 """
68 if image_name:
69 bitbake_env_cmd = "bitbake -e %s" % image_name
70 else:
71 bitbake_env_cmd = "bitbake -e"
72 rc, bitbake_env_lines = exec_cmd(bitbake_env_cmd)
73 if rc != 0:
74 print "Couldn't get '%s' output." % bitbake_env_cmd
75 return None
76
77 return bitbake_env_lines
78
79
80def find_artifacts(image_name): 63def find_artifacts(image_name):
81 """ 64 """
82 Gather the build artifacts for the current image (the image_name 65 Gather the build artifacts for the current image (the image_name
diff --git a/scripts/lib/mic/utils/oe/misc.py b/scripts/lib/mic/utils/oe/misc.py
index 7ad3aa9685..5436a0a1fe 100644
--- a/scripts/lib/mic/utils/oe/misc.py
+++ b/scripts/lib/mic/utils/oe/misc.py
@@ -126,6 +126,22 @@ def set_bitbake_env_lines(bitbake_env_lines):
126def get_bitbake_env_lines(): 126def get_bitbake_env_lines():
127 return __bitbake_env_lines 127 return __bitbake_env_lines
128 128
129def find_bitbake_env_lines(image_name):
130 """
131 If image_name is empty, plugins might still be able to use the
132 environment, so set it regardless.
133 """
134 if image_name:
135 bitbake_env_cmd = "bitbake -e %s" % image_name
136 else:
137 bitbake_env_cmd = "bitbake -e"
138 rc, bitbake_env_lines = exec_cmd(bitbake_env_cmd)
139 if rc != 0:
140 print "Couldn't get '%s' output." % bitbake_env_cmd
141 return None
142
143 return bitbake_env_lines
144
129def get_line_val(line, key): 145def get_line_val(line, key):
130 """ 146 """
131 Extract the value from the VAR="val" string 147 Extract the value from the VAR="val" string