summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-12-18 17:13:08 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-11 11:53:37 +0000
commit7b840972e54d286df74c748f62653fcfd8aeeae8 (patch)
tree90c3f9908183c1f1f24c929676d6b37d64034901 /meta/lib
parent095bb006c3dbbfbdfa05f13d8d7b50e2a5ab2af0 (diff)
downloadast2050-yocto-poky-7b840972e54d286df74c748f62653fcfd8aeeae8.zip
ast2050-yocto-poky-7b840972e54d286df74c748f62653fcfd8aeeae8.tar.gz
lib/oe/utils.py: add pre/post process helper function
This helper function will be used to execute pre/post process commands. (From OE-Core rev: 23d409558cb12cbf0300156e67f768a13442910a) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/utils.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py
index 36f82db..defa536 100644
--- a/meta/lib/oe/utils.py
+++ b/meta/lib/oe/utils.py
@@ -61,7 +61,7 @@ def both_contain(variable1, variable2, checkvalue, d):
return ""
def prune_suffix(var, suffixes, d):
- # See if var ends with any of the suffixes listed and
+ # See if var ends with any of the suffixes listed and
# remove it if found
for suffix in suffixes:
if var.endswith(suffix):
@@ -154,3 +154,13 @@ def trim_version(version, num_parts=2):
def cpu_count():
import multiprocessing
return multiprocessing.cpu_count()
+
+def execute_pre_post_process(d, cmds):
+ if cmds is None:
+ return
+
+ for cmd in cmds.strip().split(';'):
+ cmd = cmd.strip()
+ if cmd != '':
+ bb.note("Executing %s ..." % cmd)
+ bb.build.exec_func(cmd, d)
OpenPOWER on IntegriCloud