]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_deb.bbclass: Handle colons in dependencies
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Fri, 1 Sep 2017 16:28:36 +0000 (18:28 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 1 Sep 2017 22:59:55 +0000 (23:59 +0100)
Perl dependencies may look as "Perl(Foo::Bar)", but dpkg does not
support the non-alphanumeric characters. There was already special
handling present for turning '(' and ')' into '__'. This change does
the same for ':'.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_deb.bbclass

index c5824aab97c141be5bb3613455ba45aa7e37aea1..83baa6c21be724ee51f9dab1d216bd37052b24cb 100644 (file)
@@ -192,8 +192,8 @@ def deb_write_pkg(pkg, d):
         mapping_rename_hook(localdata)
 
         def debian_cmp_remap(var):
-            # dpkg does not allow for '(' or ')' in a dependency name
-            # replace these instances with '__' and '__'
+            # dpkg does not allow for '(', ')' or ':' in a dependency name
+            # Replace any instances of them with '__'
             #
             # In debian '>' and '<' do not mean what it appears they mean
             #   '<' = less or equal
@@ -202,8 +202,7 @@ def deb_write_pkg(pkg, d):
             #
             for dep in var:
                 if '(' in dep:
-                    newdep = dep.replace('(', '__')
-                    newdep = newdep.replace(')', '__')
+                    newdep = re.sub(r'[(:)]', '__', dep)
                     if newdep != dep:
                         var[newdep] = var[dep]
                         del var[dep]