diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-19 19:31:54 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-19 22:50:12 +0000 |
commit | 7b05ea65a8db8a27b2a5579675775ee34ceb63c2 (patch) | |
tree | f727a1a6199ceaf7c0cb77d6ca8890fbea97ddf1 /meta/lib/oe/utils.py | |
parent | 85cec1e3df68e932c7b210956ef5f17b85f3616f (diff) | |
download | openembedded-core-7b05ea65a8db8a27b2a5579675775ee34ceb63c2.tar.gz openembedded-core-7b05ea65a8db8a27b2a5579675775ee34ceb63c2.tar.bz2 openembedded-core-7b05ea65a8db8a27b2a5579675775ee34ceb63c2.zip |
lib/oe/utils: Add build_depends_string function
This is useful when manipulating depends strings for task [depends]
flags and is slightly easier to parse than some inline python.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/utils.py')
-rw-r--r-- | meta/lib/oe/utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index 76806b5195..330a5ff94a 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py @@ -97,6 +97,10 @@ def param_bool(cfg, field, dflt = None): return False raise ValueError("invalid value for boolean parameter '%s': '%s'" % (field, value)) +def build_depends_string(depends, task): + """Append a taskname to a string of dependencies as used by the [depends] flag""" + return " ".join(dep + ":" + task for dep in depends.split()) + def inherits(d, *classes): """Return True if the metadata inherits any of the specified classes""" return any(bb.data.inherits_class(cls, d) for cls in classes) |