[oe-commits] João Henrique Ferreira de Freitas : wic: Move find_bitbake_env_line() to oe.misc

git at git.openembedded.org git at git.openembedded.org
Tue May 13 18:35:24 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: d881ec6136255fd0f4a8cf36f9ce148ade02c103
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=d881ec6136255fd0f4a8cf36f9ce148ade02c103

Author: João Henrique Ferreira de Freitas <joaohf at gmail.com>
Date:   Fri Apr  4 23:14:09 2014 -0300

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.

Signed-off-by: João Henrique Ferreira de Freitas <joaohf at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 scripts/lib/image/engine.py      | 17 -----------------
 scripts/lib/mic/utils/oe/misc.py | 16 ++++++++++++++++
 2 files changed, 16 insertions(+), 17 deletions(-)

diff --git a/scripts/lib/image/engine.py b/scripts/lib/image/engine.py
index 0643780..311737a 100644
--- a/scripts/lib/image/engine.py
+++ b/scripts/lib/image/engine.py
@@ -60,23 +60,6 @@ def verify_build_env():
     return True
 
 
-def find_bitbake_env_lines(image_name):
-    """
-    If image_name is empty, plugins might still be able to use the
-    environment, so set it regardless.
-    """
-    if image_name:
-        bitbake_env_cmd = "bitbake -e %s" % image_name
-    else:
-        bitbake_env_cmd = "bitbake -e"
-    rc, bitbake_env_lines = exec_cmd(bitbake_env_cmd)
-    if rc != 0:
-        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
diff --git a/scripts/lib/mic/utils/oe/misc.py b/scripts/lib/mic/utils/oe/misc.py
index 7ad3aa9..5436a0a 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):
 def get_bitbake_env_lines():
     return __bitbake_env_lines
 
+def find_bitbake_env_lines(image_name):
+    """
+    If image_name is empty, plugins might still be able to use the
+    environment, so set it regardless.
+    """
+    if image_name:
+        bitbake_env_cmd = "bitbake -e %s" % image_name
+    else:
+        bitbake_env_cmd = "bitbake -e"
+    rc, bitbake_env_lines = exec_cmd(bitbake_env_cmd)
+    if rc != 0:
+        print "Couldn't get '%s' output." % bitbake_env_cmd
+        return None
+
+    return bitbake_env_lines
+
 def get_line_val(line, key):
     """
     Extract the value from the VAR="val" string



More information about the Openembedded-commits mailing list