summaryrefslogtreecommitdiffstats
path: root/meta/classes/debian.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-14 15:49:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-16 15:35:07 +0000
commitcd4b8a8553f9d551af27941910cf4d3405ecb7b0 (patch)
tree4f2c58eca95fd5ea9a4538a66a4875fd9d947b0d /meta/classes/debian.bbclass
parent1ee53881eea3a7ca4d4f6a5ca9c4c6e6488d2348 (diff)
downloadpoky-cd4b8a8553f9d551af27941910cf4d3405ecb7b0.tar.gz
meta: Fix Deprecated warnings from regexs
Fix handling of escape characters in regexs and hence fix python Deprecation warnings which will be problematic in python 3.8. Note that some show up as: """ meta/classes/package.bbclass:1293: DeprecationWarning: invalid escape sequence \.   """ where the problem isn't on 1293 in package.bbclass but in some _prepend to a package.bbclass function in a different file like mesa.inc, often from do_package_split() calls. (From OE-Core rev: 4b1c0c7d5525fc4cea9e0f02ec54e92a6fbc6199) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/debian.bbclass')
-rw-r--r--meta/classes/debian.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/debian.bbclass b/meta/classes/debian.bbclass
index 989ea8f8d2..6f8a599ccb 100644
--- a/meta/classes/debian.bbclass
+++ b/meta/classes/debian.bbclass
@@ -29,11 +29,11 @@ python debian_package_name_hook () {
29 29
30 pkgdest = d.getVar("PKGDEST") 30 pkgdest = d.getVar("PKGDEST")
31 packages = d.getVar('PACKAGES') 31 packages = d.getVar('PACKAGES')
32 so_re = re.compile("lib.*\.so") 32 so_re = re.compile(r"lib.*\.so")
33 33
34 def socrunch(s): 34 def socrunch(s):
35 s = s.lower().replace('_', '-') 35 s = s.lower().replace('_', '-')
36 m = re.match("^(.*)(.)\.so\.(.*)$", s) 36 m = re.match(r"^(.*)(.)\.so\.(.*)$", s)
37 if m is None: 37 if m is None:
38 return None 38 return None
39 if m.group(2) in '0123456789': 39 if m.group(2) in '0123456789':
@@ -79,7 +79,7 @@ python debian_package_name_hook () {
79 try: 79 try:
80 cmd = [d.expand("${TARGET_PREFIX}objdump"), "-p", f] 80 cmd = [d.expand("${TARGET_PREFIX}objdump"), "-p", f]
81 output = subprocess.check_output(cmd).decode("utf-8") 81 output = subprocess.check_output(cmd).decode("utf-8")
82 for m in re.finditer("\s+SONAME\s+([^\s]+)", output): 82 for m in re.finditer(r"\s+SONAME\s+([^\s]+)", output):
83 if m.group(1) not in sonames: 83 if m.group(1) not in sonames:
84 sonames.append(m.group(1)) 84 sonames.append(m.group(1))
85 except subprocess.CalledProcessError: 85 except subprocess.CalledProcessError: