diff options
Diffstat (limited to 'scripts/lib/mic')
-rw-r--r-- | scripts/lib/mic/utils/oe/misc.py | 16 |
1 files changed, 16 insertions, 0 deletions
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): | |||
126 | def get_bitbake_env_lines(): | 126 | def get_bitbake_env_lines(): |
127 | return __bitbake_env_lines | 127 | return __bitbake_env_lines |
128 | 128 | ||
129 | def 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 | |||
129 | def get_line_val(line, key): | 145 | def 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 |