aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-09 11:22:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-10 18:11:19 +0000
commitfc08972688d784f561c8be88d3100d6baaf22070 (patch)
tree15b6e928805e499bde428e19937447a3ba580494
parentcc1d2b00403be93bbf1f7c5e55f9b8afdd2a73ce (diff)
downloadopenembedded-core-contrib-fc08972688d784f561c8be88d3100d6baaf22070.tar.gz
package_deb: Handle / in dependency name
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>
-rw-r--r--meta/classes/package_deb.bbclass8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 5d297939b6..2e8d17d3c7 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -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]