summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_deb.bbclass
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-11 10:26:06 +0000
commit1117f74385fe60d7eaeaef13ce5927e4798d6992 (patch)
tree0577769ed1b9358107da18ec23dff2572f7f860c /meta/classes/package_deb.bbclass
parent3da70202cc26760cb7846e07faa70f9de36f7eb6 (diff)
downloadpoky-1117f74385fe60d7eaeaef13ce5927e4798d6992.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. (From OE-Core rev: fc08972688d784f561c8be88d3100d6baaf22070) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_deb.bbclass')
-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):
230 # '>' = greater or equal 230 # '>' = greater or equal
231 # adjust these to the '<<' and '>>' equivalents 231 # adjust these to the '<<' and '>>' equivalents
232 # 232 #
233 for dep in var: 233 for dep in list(var.keys()):
234 if '(' in dep: 234 if '(' in dep or '/' in dep:
235 newdep = re.sub(r'[(:)]', '__', dep) 235 newdep = re.sub(r'[(:)/]', '__', dep)
236 if newdep.startswith("__"):
237 newdep = "A" + newdep
236 if newdep != dep: 238 if newdep != dep:
237 var[newdep] = var[dep] 239 var[newdep] = var[dep]
238 del var[dep] 240 del var[dep]