diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-20 11:17:05 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-06-02 08:24:00 +0100 |
commit | a7309d5790f5dac46e84d3c14959943eb2496fda (patch) | |
tree | 48e1fcb886b8ef2974bade09694356f3230fb8a8 /meta/classes/libc-package.bbclass | |
parent | 297438e965053b2eb56cc8ef3e59465642f10a24 (diff) | |
download | poky-a7309d5790f5dac46e84d3c14959943eb2496fda.tar.gz |
classes/lib: Update to use python3 command pipeline decoding
In python3, strings are unicode by default. We need to encode/decode
from command pipelines and other places where we interface with the
real world using the correct locales. This patch updates various
call sites to use the correct encoding/decodings.
(From OE-Core rev: bb4685af1bffe17b3aa92a6d21398f38a44ea874)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/libc-package.bbclass')
-rw-r--r-- | meta/classes/libc-package.bbclass | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass index 467d567923..70f479bb41 100644 --- a/meta/classes/libc-package.bbclass +++ b/meta/classes/libc-package.bbclass | |||
@@ -150,6 +150,7 @@ python package_do_split_gconvs () { | |||
150 | c_re = re.compile('^copy "(.*)"') | 150 | c_re = re.compile('^copy "(.*)"') |
151 | i_re = re.compile('^include "(\w+)".*') | 151 | i_re = re.compile('^include "(\w+)".*') |
152 | for l in f.readlines(): | 152 | for l in f.readlines(): |
153 | l = l.decode("latin-1") | ||
153 | m = c_re.match(l) or i_re.match(l) | 154 | m = c_re.match(l) or i_re.match(l) |
154 | if m: | 155 | if m: |
155 | dp = legitimize_package_name('%s%s-gconv-%s' % (mlprefix, bpn, m.group(1))) | 156 | dp = legitimize_package_name('%s%s-gconv-%s' % (mlprefix, bpn, m.group(1))) |
@@ -171,6 +172,7 @@ python package_do_split_gconvs () { | |||
171 | c_re = re.compile('^copy "(.*)"') | 172 | c_re = re.compile('^copy "(.*)"') |
172 | i_re = re.compile('^include "(\w+)".*') | 173 | i_re = re.compile('^include "(\w+)".*') |
173 | for l in f.readlines(): | 174 | for l in f.readlines(): |
175 | l = l.decode("latin-1") | ||
174 | m = c_re.match(l) or i_re.match(l) | 176 | m = c_re.match(l) or i_re.match(l) |
175 | if m: | 177 | if m: |
176 | dp = legitimize_package_name('%s%s-charmap-%s' % (mlprefix, bpn, m.group(1))) | 178 | dp = legitimize_package_name('%s%s-charmap-%s' % (mlprefix, bpn, m.group(1))) |
@@ -191,6 +193,7 @@ python package_do_split_gconvs () { | |||
191 | c_re = re.compile('^copy "(.*)"') | 193 | c_re = re.compile('^copy "(.*)"') |
192 | i_re = re.compile('^include "(\w+)".*') | 194 | i_re = re.compile('^include "(\w+)".*') |
193 | for l in f.readlines(): | 195 | for l in f.readlines(): |
196 | l = l.decode("latin-1") | ||
194 | m = c_re.match(l) or i_re.match(l) | 197 | m = c_re.match(l) or i_re.match(l) |
195 | if m: | 198 | if m: |
196 | dp = legitimize_package_name(mlprefix+bpn+'-localedata-%s' % m.group(1)) | 199 | dp = legitimize_package_name(mlprefix+bpn+'-localedata-%s' % m.group(1)) |