summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-06-30 09:47:36 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-06-30 09:47:36 +0100
commit9a543b75cab2daf6536afce100cb5d6031fca9e0 (patch)
tree41ab56c43874af83d099adff72f4d49bb3e03efe /bitbake/lib/bb
parentb180d7f488f44d3dfb3f9a19604e9592c29b426e (diff)
downloadopenembedded-core-9a543b75cab2daf6536afce100cb5d6031fca9e0.tar.gz
openembedded-core-9a543b75cab2daf6536afce100cb5d6031fca9e0.tar.bz2
openembedded-core-9a543b75cab2daf6536afce100cb5d6031fca9e0.tar.xz
openembedded-core-9a543b75cab2daf6536afce100cb5d6031fca9e0.zip
bitbake: Add bb.utils.join_deps to handle creation of dependency strings with versions
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/utils.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 40326f98d..86b9c724e 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -138,6 +138,18 @@ def explode_dep_versions(s):
return r
+def join_deps(deps):
+ """
+ Take the result from explode_dep_versions and generate a dependency string
+ """
+ result = []
+ for dep in deps:
+ if deps[dep]:
+ result.append(dep + " (" + deps[dep] + ")")
+ else:
+ result.append(dep)
+ return ", ".join(result)
+
def _print_trace(body, line):
"""
Print the Environment of a Text Body