[oe-commits] [openembedded-core] 16/41: insane: optimise buildpath search
git at git.openembedded.org
git at git.openembedded.org
Wed Jul 18 09:20:18 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit ffb52d383bfe413cf31fef13663fe9937a146c76
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Thu Jul 12 14:44:06 2018 +0100
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.
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/insane.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 713b40e..469d5c4 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -535,9 +535,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))
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list