diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2010-06-30 09:47:36 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-06-30 09:47:36 +0100 |
commit | 9a543b75cab2daf6536afce100cb5d6031fca9e0 (patch) | |
tree | 41ab56c43874af83d099adff72f4d49bb3e03efe /bitbake | |
parent | b180d7f488f44d3dfb3f9a19604e9592c29b426e (diff) | |
download | poky-9a543b75cab2daf6536afce100cb5d6031fca9e0.tar.gz |
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')
-rw-r--r-- | bitbake/lib/bb/utils.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index 40326f98d2..86b9c724ed 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py | |||
@@ -138,6 +138,18 @@ def explode_dep_versions(s): | |||
138 | 138 | ||
139 | return r | 139 | return r |
140 | 140 | ||
141 | def join_deps(deps): | ||
142 | """ | ||
143 | Take the result from explode_dep_versions and generate a dependency string | ||
144 | """ | ||
145 | result = [] | ||
146 | for dep in deps: | ||
147 | if deps[dep]: | ||
148 | result.append(dep + " (" + deps[dep] + ")") | ||
149 | else: | ||
150 | result.append(dep) | ||
151 | return ", ".join(result) | ||
152 | |||
141 | def _print_trace(body, line): | 153 | def _print_trace(body, line): |
142 | """ | 154 | """ |
143 | Print the Environment of a Text Body | 155 | Print the Environment of a Text Body |