* [PATCH 0/1] insane.bbclass:buildpaths: open() file with 'rb'
@ 2016-11-01 12:44 Robert Yang
2016-11-01 12:44 ` [PATCH 1/1] " Robert Yang
0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2016-11-01 12:44 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 98c6ebf1e05158c689e01b785d32757847cdb10c:
oeqa/selftest/kernel.py: Add new file destined for kernel related tests (2016-11-01 10:05:40 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/bp
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/bp
Robert Yang (1):
insane.bbclass:buildpaths: open() file with 'rb'
meta/classes/insane.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 1/1] insane.bbclass:buildpaths: open() file with 'rb'
2016-11-01 12:44 [PATCH 0/1] insane.bbclass:buildpaths: open() file with 'rb' Robert Yang
@ 2016-11-01 12:44 ` Robert Yang
0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2016-11-01 12:44 UTC (permalink / raw)
To: openembedded-core
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>
---
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 1d73778..a5c93f3 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))
--
2.9.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-01 12:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-01 12:44 [PATCH 0/1] insane.bbclass:buildpaths: open() file with 'rb' Robert Yang
2016-11-01 12:44 ` [PATCH 1/1] " Robert Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox