summaryrefslogtreecommitdiffstats
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 17:17:01 +0000
commit7843548285e2eea8158670316058fff4b769c236 (patch)
tree1abc8618037b3e34b1a0fe93f8a38b93e5e1c0f4 /meta/classes/insane.bbclass
parent0985ac745f978396086417a25c1271e28ec65b2d (diff)
downloadpoky-7843548285e2eea8158670316058fff4b769c236.tar.gz
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. (From OE-Core rev: 252b69c9f2abe3258366c540f56b156ed63e5437) 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):
111 phdrs = elf.run_objdump("-p", d) 111 phdrs = elf.run_objdump("-p", d)
112 112
113 import re 113 import re
114 rpath_re = re.compile("\s+RPATH\s+(.*)") 114 rpath_re = re.compile(r"\s+RPATH\s+(.*)")
115 for line in phdrs.split("\n"): 115 for line in phdrs.split("\n"):
116 m = rpath_re.match(line) 116 m = rpath_re.match(line)
117 if m: 117 if m:
@@ -140,7 +140,7 @@ def package_qa_check_useless_rpaths(file, name, d, elf, messages):
140 phdrs = elf.run_objdump("-p", d) 140 phdrs = elf.run_objdump("-p", d)
141 141
142 import re 142 import re
143 rpath_re = re.compile("\s+RPATH\s+(.*)") 143 rpath_re = re.compile(r"\s+RPATH\s+(.*)")
144 for line in phdrs.split("\n"): 144 for line in phdrs.split("\n"):
145 m = rpath_re.match(line) 145 m = rpath_re.match(line)
146 if m: 146 if m:
@@ -203,8 +203,8 @@ def package_qa_check_libdir(d):
203 # The re's are purposely fuzzy, as some there are some .so.x.y.z files 203 # The re's are purposely fuzzy, as some there are some .so.x.y.z files
204 # that don't follow the standard naming convention. It checks later 204 # that don't follow the standard naming convention. It checks later
205 # that they are actual ELF files 205 # that they are actual ELF files
206 lib_re = re.compile("^/lib.+\.so(\..+)?$") 206 lib_re = re.compile(r"^/lib.+\.so(\..+)?$")
207 exec_re = re.compile("^%s.*/lib.+\.so(\..+)?$" % exec_prefix) 207 exec_re = re.compile(r"^%s.*/lib.+\.so(\..+)?$" % exec_prefix)
208 208
209 for root, dirs, files in os.walk(pkgdest): 209 for root, dirs, files in os.walk(pkgdest):
210 if root == pkgdest: 210 if root == pkgdest:
@@ -302,7 +302,7 @@ def package_qa_check_arch(path,name,d, elf, messages):
302 # Check the architecture and endiannes of the binary 302 # Check the architecture and endiannes of the binary
303 is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \ 303 is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
304 (target_os == "linux-gnux32" or target_os == "linux-muslx32" or \ 304 (target_os == "linux-gnux32" or target_os == "linux-muslx32" or \
305 target_os == "linux-gnu_ilp32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE'))) 305 target_os == "linux-gnu_ilp32" or re.match(r'mips64.*32', d.getVar('DEFAULTTUNE')))
306 is_bpf = (oe.qa.elf_machine_to_string(elf.machine()) == "BPF") 306 is_bpf = (oe.qa.elf_machine_to_string(elf.machine()) == "BPF")
307 if not ((machine == elf.machine()) or is_32 or is_bpf): 307 if not ((machine == elf.machine()) or is_32 or is_bpf):
308 package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \ 308 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):
342 sane = True 342 sane = True
343 343
344 import re 344 import re
345 textrel_re = re.compile("\s+TEXTREL\s+") 345 textrel_re = re.compile(r"\s+TEXTREL\s+")
346 for line in phdrs.split("\n"): 346 for line in phdrs.split("\n"):
347 if textrel_re.match(line): 347 if textrel_re.match(line):
348 sane = False 348 sane = False
@@ -952,7 +952,7 @@ python do_package_qa () {
952 952
953 import re 953 import re
954 # The package name matches the [a-z0-9.+-]+ regular expression 954 # The package name matches the [a-z0-9.+-]+ regular expression
955 pkgname_pattern = re.compile("^[a-z0-9.+-]+$") 955 pkgname_pattern = re.compile(r"^[a-z0-9.+-]+$")
956 956
957 taskdepdata = d.getVar("BB_TASKDEPDATA", False) 957 taskdepdata = d.getVar("BB_TASKDEPDATA", False)
958 taskdeps = set() 958 taskdeps = set()
@@ -1160,7 +1160,7 @@ python () {
1160 if pn in overrides: 1160 if pn in overrides:
1161 msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn) 1161 msg = 'Recipe %s has PN of "%s" which is in OVERRIDES, this can result in unexpected behaviour.' % (d.getVar("FILE"), pn)
1162 package_qa_handle_error("pn-overrides", msg, d) 1162 package_qa_handle_error("pn-overrides", msg, d)
1163 prog = re.compile('[A-Z]') 1163 prog = re.compile(r'[A-Z]')
1164 if prog.search(pn): 1164 if prog.search(pn):
1165 package_qa_handle_error("uppercase-pn", 'PN: %s is upper case, this can result in unexpected behavior.' % pn, d) 1165 package_qa_handle_error("uppercase-pn", 'PN: %s is upper case, this can result in unexpected behavior.' % pn, d)
1166 1166