diff options
| author | Mark Hatle <mark.hatle@windriver.com> | 2012-11-29 20:53:29 -0600 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-06 12:31:07 +0000 |
| commit | ca36d34c2e6be96cab9b2a46a3c920832ae8d246 (patch) | |
| tree | 87c59f7a5842585dfb9d13d19c07a17623e162d9 | |
| parent | 2f5da1bc42992b2650090f0dcd1b5184944303a8 (diff) | |
| download | poky-ca36d34c2e6be96cab9b2a46a3c920832ae8d246.tar.gz | |
package_deb: Dependencies with a ( or ) in them are invalid in debs
Replace ( or ) with __. This allows RPM style dependencies to be satisfied
in deb style packages.
(From OE-Core rev: 12acb6bb00ba665571fcfbdb0ef4668ca0a98d5b)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes/package_deb.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass index d273cb0f84..eed9b8ac3b 100644 --- a/meta/classes/package_deb.bbclass +++ b/meta/classes/package_deb.bbclass | |||
| @@ -335,12 +335,22 @@ python do_package_deb () { | |||
| 335 | mapping_rename_hook(localdata) | 335 | mapping_rename_hook(localdata) |
| 336 | 336 | ||
| 337 | def debian_cmp_remap(var): | 337 | def debian_cmp_remap(var): |
| 338 | # dpkg does not allow for '(' or ')' in a dependency name | ||
| 339 | # replace these instances with '__' and '__' | ||
| 340 | # | ||
| 338 | # In debian '>' and '<' do not mean what it appears they mean | 341 | # In debian '>' and '<' do not mean what it appears they mean |
| 339 | # '<' = less or equal | 342 | # '<' = less or equal |
| 340 | # '>' = greater or equal | 343 | # '>' = greater or equal |
| 341 | # adjust these to the '<<' and '>>' equivalents | 344 | # adjust these to the '<<' and '>>' equivalents |
| 342 | # | 345 | # |
| 343 | for dep in var: | 346 | for dep in var: |
| 347 | if '(' in dep: | ||
| 348 | newdep = dep.replace('(', '__') | ||
| 349 | newdep = newdep.replace(')', '__') | ||
| 350 | if newdep != dep: | ||
| 351 | var[newdep] = var[dep] | ||
| 352 | del var[dep] | ||
| 353 | for dep in var: | ||
| 344 | for i, v in enumerate(var[dep]): | 354 | for i, v in enumerate(var[dep]): |
| 345 | if (v or "").startswith("< "): | 355 | if (v or "").startswith("< "): |
| 346 | var[dep][i] = var[dep][i].replace("< ", "<< ") | 356 | var[dep][i] = var[dep][i].replace("< ", "<< ") |
