diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-14 15:49:50 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-14 23:02:47 +0000 |
commit | 4b1c0c7d5525fc4cea9e0f02ec54e92a6fbc6199 (patch) | |
tree | a7cd5e4a23914ba5b5812b98587d97c5e8b8dd2f /meta/classes/debian.bbclass | |
parent | fa7020c040189ae904625b5c60c8a7e79dc1145e (diff) | |
download | openembedded-core-contrib-4b1c0c7d5525fc4cea9e0f02ec54e92a6fbc6199.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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/debian.bbclass')
-rw-r--r-- | meta/classes/debian.bbclass | 6 |
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 () { pkgdest = d.getVar("PKGDEST") packages = d.getVar('PACKAGES') - so_re = re.compile("lib.*\.so") + so_re = re.compile(r"lib.*\.so") def socrunch(s): s = s.lower().replace('_', '-') - m = re.match("^(.*)(.)\.so\.(.*)$", s) + m = re.match(r"^(.*)(.)\.so\.(.*)$", s) if m is None: return None if m.group(2) in '0123456789': @@ -79,7 +79,7 @@ python debian_package_name_hook () { try: cmd = [d.expand("${TARGET_PREFIX}objdump"), "-p", f] output = subprocess.check_output(cmd).decode("utf-8") - for m in re.finditer("\s+SONAME\s+([^\s]+)", output): + for m in re.finditer(r"\s+SONAME\s+([^\s]+)", output): if m.group(1) not in sonames: sonames.append(m.group(1)) except subprocess.CalledProcessError: |