aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/utils.py
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-07-01 22:28:55 +0100
commit3e808d6a5cdb78482f71c91a3d81d64262b005d6 (patch)
tree45f030591b96d18545a793f51493ccc6d1949f5a /lib/bb/utils.py
parentdc92299412afde3b978ca7adf76647763dfba6cc (diff)
downloadbitbake-3e808d6a5cdb78482f71c91a3d81d64262b005d6.tar.gz
Add bb.utils.join_deps to handle creation of dependency strings with versions
(From Poky rev: 9a543b75cab2daf6536afce100cb5d6031fca9e) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'lib/bb/utils.py')
-rw-r--r--lib/bb/utils.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/bb/utils.py b/lib/bb/utils.py
index 5ec93c7b0..599ec955f 100644
--- a/lib/bb/utils.py
+++ b/lib/bb/utils.py
@@ -275,6 +275,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