[oe-commits] [openembedded-core] 10/17: insane: optimise buildpath search

git at git.openembedded.org git at git.openembedded.org
Sun Jul 29 23:03:21 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch sumo
in repository openembedded-core.

commit e0e366731116e62857fa3bdec9e3897aafcc8137
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.
    
    (From OE-Core rev: ffb52d383bfe413cf31fef13663fe9937a146c76)
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.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 fa15460..eb2d967 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))
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list