aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-11-01 05:25:46 -0700
committerRobert Yang <liezhi.yang@windriver.com>2016-11-01 05:43:50 -0700
commit07270c9fd68b8a4a4154458ad01d44da1c66291a (patch)
treede1bb6cbecf1c2df3ad0786310775611b6314567
parent98c6ebf1e05158c689e01b785d32757847cdb10c (diff)
downloadopenembedded-core-contrib-rbt/bp.tar.gz
insane.bbclass:buildpaths: open() file with 'rb'rbt/bp
open() is default to 'rt' which may cause decoding errors when open binary file: $ bitbake xcursor-transparent-theme [snip] Exception: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfd in position 18: invalid start byte [snip] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-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 1d73778255..a5c93f33ff 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -647,8 +647,8 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
return
tmpdir = d.getVar('TMPDIR', True)
- with open(path) as f:
- file_content = f.read()
+ with open(path, 'rb') as f:
+ file_content = f.read().decode('utf-8', errors='ignore')
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))