]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_deb: Handle / in dependency name
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 9 Jan 2018 11:22:54 +0000 (11:22 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 Jan 2018 18:11:19 +0000 (18:11 +0000)
We can end up with / in dependency names from file dependencies but the
deb format doesn't allow this. Filter the names to allow such dependencies
to work. Names have to start with an alphanumeric digit so also handle this.

This allows for future handling of "per file" dependencies similarly to
the rpm backend, bring parity to the functionality of the backends.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_deb.bbclass

index 5d297939b6ccb8e23d7b50440b5f0c0138129a0a..2e8d17d3c71d05137dab704091f2a0f53d38f1ac 100644 (file)
@@ -230,9 +230,11 @@ def deb_write_pkg(pkg, d):
             #   '>' = greater or equal
             # adjust these to the '<<' and '>>' equivalents
             #
-            for dep in var:
-                if '(' in dep:
-                    newdep = re.sub(r'[(:)]', '__', dep)
+            for dep in list(var.keys()):
+                if '(' in dep or '/' in dep:
+                    newdep = re.sub(r'[(:)/]', '__', dep)
+                    if newdep.startswith("__"):
+                        newdep = "A" + newdep
                     if newdep != dep:
                         var[newdep] = var[dep]
                         del var[dep]