summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2017-09-01 18:28:36 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-02 00:52:10 +0100
commit2563e866b34e84e798c89df8cc18c2685b5f51e2 (patch)
treec6c184ceeb354d509627bb5880ace4b6c436cb7a /meta/classes
parentd58862b376ddf734ebfcf1acbe28defdc101f645 (diff)
downloadpoky-2563e866b34e84e798c89df8cc18c2685b5f51e2.tar.gz
package_deb.bbclass: Handle colons in dependencies
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 ':'. (From OE-Core rev: a34e397095a9c2f8d0af1168ceab295af659242d) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package_deb.bbclass7
1 files changed, 3 insertions, 4 deletions
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index c5824aab97..83baa6c21b 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -192,8 +192,8 @@ def deb_write_pkg(pkg, d):
192 mapping_rename_hook(localdata) 192 mapping_rename_hook(localdata)
193 193
194 def debian_cmp_remap(var): 194 def debian_cmp_remap(var):
195 # dpkg does not allow for '(' or ')' in a dependency name 195 # dpkg does not allow for '(', ')' or ':' in a dependency name
196 # replace these instances with '__' and '__' 196 # Replace any instances of them with '__'
197 # 197 #
198 # In debian '>' and '<' do not mean what it appears they mean 198 # In debian '>' and '<' do not mean what it appears they mean
199 # '<' = less or equal 199 # '<' = less or equal
@@ -202,8 +202,7 @@ def deb_write_pkg(pkg, d):
202 # 202 #
203 for dep in var: 203 for dep in var:
204 if '(' in dep: 204 if '(' in dep:
205 newdep = dep.replace('(', '__') 205 newdep = re.sub(r'[(:)]', '__', dep)
206 newdep = newdep.replace(')', '__')
207 if newdep != dep: 206 if newdep != dep:
208 var[newdep] = var[dep] 207 var[newdep] = var[dep]
209 del var[dep] 208 del var[dep]