summaryrefslogtreecommitdiff
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2013-12-06 16:11:54 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-10 11:33:46 +0000
commit259b8718a31b886f8a158aeb5de164840c9a28b2 (patch)
treeb1bf7198e1bf0aa91fb8454fe39c5adf60f98ed1 /meta/classes/buildhistory.bbclass
parentec3bb2c2203b2e8bafc1a631f623f858779e20b7 (diff)
downloadopenembedded-core-259b8718a31b886f8a158aeb5de164840c9a28b2.tar.gz
openembedded-core-259b8718a31b886f8a158aeb5de164840c9a28b2.tar.bz2
openembedded-core-259b8718a31b886f8a158aeb5de164840c9a28b2.zip
buildhistory.bbclass: Specify lang in decoding strings
On systems where default locale is utf-8 we get errors like File: 'buildhistory.bbclass', lineno: 38, function: write_pkghistory 0034: if pkginfo.rconflicts: 0035: f.write("RCONFLICTS = %s\n" % pkginfo.rconflicts) 0036: f.write("PKGSIZE = %d\n" % pkginfo.size) 0037: f.write("FILES = %s\n" % pkginfo.files) *** 0038: f.write("FILELIST = %s\n" % pkginfo.filelist) 0039: 0040: for filevar in pkginfo.filevars: 0041: filevarpath = os.path.join(pkgpath, "latest.%s" % filevar) 0042: val = pkginfo.filevars[filevar] Exception: UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 337: ordinal not in range(128) This patch specifies decode to use utf-8 so ascii and utf-8 based locales both work Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r--meta/classes/buildhistory.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 757173ee2a..3590da0480 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -190,7 +190,7 @@ python buildhistory_emit_pkghistory() {
key = item[0]
if key.endswith('_' + pkg):
key = key[:-len(pkg)-1]
- pkgdata[key] = item[1].decode('string_escape')
+ pkgdata[key] = item[1].decode('utf-8', 'string_escape')
pkge = pkgdata.get('PKGE', '0')
pkgv = pkgdata['PKGV']