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. (From OE-Core rev: 7b05ea65a8db8a27b2a5579675775ee34ceb63c2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
7085148116
commit
eeb30764e9
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue