[oe-commits] Laurentiu Palcu : lib/oe/utils.py: add pre/post process helper function
git at git.openembedded.org
git at git.openembedded.org
Tue Feb 11 11:56:58 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 23d409558cb12cbf0300156e67f768a13442910a
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=23d409558cb12cbf0300156e67f768a13442910a
Author: Laurentiu Palcu <laurentiu.palcu at intel.com>
Date: Wed Dec 18 17:13:08 2013 +0200
lib/oe/utils.py: add pre/post process helper function
This helper function will be used to execute pre/post process commands.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu at intel.com>
---
meta/lib/oe/utils.py | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
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)
More information about the Openembedded-commits
mailing list