aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/insane.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-07 00:04:50 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-08 00:12:34 +0000
commit252b69c9f2abe3258366c540f56b156ed63e5437 (patch)
tree16cc36df6a0b7226a60bd0b3ce42e3177b762605 /meta/classes/insane.bbclass
parent48719bc4d108df7e357e7f22f9f356cd72b3ebbd (diff)
downloadopenembedded-core-contrib-252b69c9f2abe3258366c540f56b156ed63e5437.tar.gz
openembedded-core-contrib-252b69c9f2abe3258366c540f56b156ed63e5437.tar.bz2
openembedded-core-contrib-252b69c9f2abe3258366c540f56b156ed63e5437.zip
classes: Correctly markup regex strings
There are various escape characters in these stings which python warns about so use the correct regex markup for them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r--meta/classes/insane.bbclass16
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 6718feb3af..295feb8a5f 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -111,7 +111,7 @@ def package_qa_check_rpath(file,name, d, elf, messages):
phdrs = elf.run_objdump("-p", d)
import re
- rpath_re = re.compile("\s+RPATH\s+(.*)")
+ rpath_re = re.compile(r"\s+RPATH\s+(.*)")
for line in phdrs.split("\n"):
m = rpath_re.match(line)
if m:
@@ -140,7 +140,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
phdrs = elf.run_objdump("-p", d)
import re
- rpath_re = re.compile("\s+RPATH\s+(.*)")
+ rpath_re = re.compile(r"\s+RPATH\s+(.*)")
for line in phdrs.split("\n"):
m = rpath_re.match(line)
if m:
@@ -203,8 +203,8 @@ def package_qa_check_libdir(d):
# The re's are purposely fuzzy, as some there are some .so.x.y.z files
# that don't follow the standard naming convention. It checks later
# that they are actual ELF files
- lib_re = re.compile("^/lib.+\.so(\..+)?$")
- exec_re = re.compile("^%s.*/lib.+\.so(\..+)?$" % exec_prefix)
+ lib_re = re.compile(r"^/lib.+\.so(\..+)?$")
+ exec_re = re.compile(r"^%s.*/lib.+\.so(\..+)?$" % exec_prefix)
for root, dirs, files in os.walk(pkgdest):
if root == pkgdest:
@@ -302,7 +302,7 @@ def package_qa_check_arch(path,name,d, elf, messages):
# Check the architecture and endiannes of the binary
is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
(target_os == "linux-gnux32" or target_os == "linux-muslx32" or \
- target_os == "linux-gnu_ilp32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE')))
+ target_os == "linux-gnu_ilp32" or re.match(r'mips64.*32', d.getVar('DEFAULTTUNE')))
is_bpf = (oe.qa.elf_machine_to_string(elf.machine()) == "BPF")
if not ((machine == elf.machine()) or is_32 or is_bpf):
package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \
@@ -342,7 +342,7 @@ def package_qa_textrel(path, name, d, elf, messages):
sane = True
import re
- textrel_re = re.compile("\s+TEXTREL\s+")
+ textrel_re = re.compile(r"\s+TEXTREL\s+")
for line in phdrs.split("\n"):
if textrel_re.match(line):
sane = False
@@ -952,7 +952,7 @@ python do_package_qa () {
import re
# The package name matches the [a-z0-9.+-]+ regular expression
- pkgname_pattern = re.compile("^[a-z0-9.+-]+$")
+ pkgname_pattern = re.compile(r"^[a-z0-9.+-]+$")
taskdepdata = d.getVar("BB_TASKDEPDATA", False)
taskdeps = set()
@@ -1160,7 +1160,7 @@ python () {
if pn in overrides:
msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn)
package_qa_handle_error("pn-overrides", msg, d)
- prog = re.compile('[A-Z]')
+ prog = re.compile(r'[A-Z]')
if prog.search(pn):
package_qa_handle_error("uppercase-pn", 'PN: %s is upper case, this can result in unexpected behavior.' % pn, d)