]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_deb: Dependencies with a ( or ) in them are invalid in debs
authorMark Hatle <mark.hatle@windriver.com>
Fri, 30 Nov 2012 02:53:29 +0000 (20:53 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 6 Dec 2012 12:30:33 +0000 (12:30 +0000)
Replace ( or ) with __.  This allows RPM style dependencies to be satisfied
in deb style packages.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/classes/package_deb.bbclass

index d273cb0f847e40eafb723a0d0ec591ab0055b242..eed9b8ac3bdd70ccb3ea2d0dfdf00487ccc538ef 100644 (file)
@@ -335,11 +335,21 @@ python do_package_deb () {
         mapping_rename_hook(localdata)
 
         def debian_cmp_remap(var):
+            # dpkg does not allow for '(' or ')' in a dependency name
+            # replace these instances with '__' and '__'
+            #
             # In debian '>' and '<' do not mean what it appears they mean
             #   '<' = less or equal
             #   '>' = greater or equal
             # adjust these to the '<<' and '>>' equivalents
             #
+            for dep in var:
+                if '(' in dep:
+                    newdep = dep.replace('(', '__')
+                    newdep = newdep.replace(')', '__')
+                    if newdep != dep:
+                        var[newdep] = var[dep]
+                        del var[dep]
             for dep in var:
                 for i, v in enumerate(var[dep]):
                     if (v or "").startswith("< "):