aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-07-12 14:44:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-30 00:01:02 +0100
commite0e366731116e62857fa3bdec9e3897aafcc8137 (patch)
treee4dd1bc86fcb60cea1d62752fcd0bf335ac55480 /meta/classes
parent167d0c4a9f45e3b8172fc34bf80f3fa587513b0a (diff)
downloadopenembedded-core-contrib-e0e366731116e62857fa3bdec9e3897aafcc8137.tar.gz
insane: optimise buildpath search
Instead of decoding every file we open as UTF-8 (with many errors as machine code isn't UTF-8), convert the build path to the UTF-8 byte representation and search for that instead. (From OE-Core rev: ffb52d383bfe413cf31fef13663fe9937a146c76) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/insane.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index fa15460842..eb2d96711e 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -534,9 +534,9 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
if path.find(name + "/CONTROL/") != -1 or path.find(name + "/DEBIAN/") != -1:
return
- tmpdir = d.getVar('TMPDIR')
+ tmpdir = bytes(d.getVar('TMPDIR'), encoding="utf-8")
with open(path, 'rb') as f:
- file_content = f.read().decode('utf-8', errors='ignore')
+ file_content = f.read()
if tmpdir in file_content:
package_qa_add_message(messages, "buildpaths", "File %s in package contained reference to tmpdir" % package_qa_clean_path(path,d))