mirror of
https://git.yoctoproject.org/poky
synced 2026-04-30 12:32:12 +02:00
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>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user