diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-09 16:31:22 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-16 23:32:39 +0100 |
commit | 1fc840ffc0267ecf3a15c4a59ab44869ef1d6339 (patch) | |
tree | b2932a0d0d7146bde799db47497236063050fc84 /meta/classes/package.bbclass | |
parent | 22c8ed6484e0ee9328e3844c9e794f3d89ebb9f7 (diff) | |
download | poky-1fc840ffc0267ecf3a15c4a59ab44869ef1d6339.tar.gz |
meta: python3 megapatch
This needs splutting into smaller units, WIP atm.
(From OE-Core rev: 21529228a7dca96a6a1b44ed9380c523efdeeb3e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index ffd4eff7b1..f2df923273 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
@@ -63,7 +63,7 @@ def legitimize_package_name(s): | |||
63 | def fixutf(m): | 63 | def fixutf(m): |
64 | cp = m.group(1) | 64 | cp = m.group(1) |
65 | if cp: | 65 | if cp: |
66 | return ('\u%s' % cp).decode('unicode_escape').encode('utf-8') | 66 | return ('\\u%s' % cp).encode('latin-1').decode('unicode_escape') |
67 | 67 | ||
68 | # Handle unicode codepoints encoded as <U0123>, as in glibc locale files. | 68 | # Handle unicode codepoints encoded as <U0123>, as in glibc locale files. |
69 | s = re.sub('<U([0-9A-Fa-f]{1,4})>', fixutf, s) | 69 | s = re.sub('<U([0-9A-Fa-f]{1,4})>', fixutf, s) |
@@ -1258,8 +1258,8 @@ python emit_pkgdata() { | |||
1258 | def write_if_exists(f, pkg, var): | 1258 | def write_if_exists(f, pkg, var): |
1259 | def encode(str): | 1259 | def encode(str): |
1260 | import codecs | 1260 | import codecs |
1261 | c = codecs.getencoder("string_escape") | 1261 | c = codecs.getencoder("unicode_escape") |
1262 | return c(str)[0] | 1262 | return c(str)[0].decode("latin1") |
1263 | 1263 | ||
1264 | val = d.getVar('%s_%s' % (var, pkg), True) | 1264 | val = d.getVar('%s_%s' % (var, pkg), True) |
1265 | if val: | 1265 | if val: |
@@ -1503,7 +1503,7 @@ python package_do_shlibs() { | |||
1503 | m = re.match("\s+RPATH\s+([^\s]*)", l) | 1503 | m = re.match("\s+RPATH\s+([^\s]*)", l) |
1504 | if m: | 1504 | if m: |
1505 | rpaths = m.group(1).replace("$ORIGIN", ldir).split(":") | 1505 | rpaths = m.group(1).replace("$ORIGIN", ldir).split(":") |
1506 | rpath = map(os.path.normpath, rpaths) | 1506 | rpath = list(map(os.path.normpath, rpaths)) |
1507 | for l in lines: | 1507 | for l in lines: |
1508 | m = re.match("\s+NEEDED\s+([^\s]*)", l) | 1508 | m = re.match("\s+NEEDED\s+([^\s]*)", l) |
1509 | if m: | 1509 | if m: |
@@ -1673,7 +1673,7 @@ python package_do_shlibs() { | |||
1673 | bb.debug(2, '%s: Dependency %s covered by PRIVATE_LIBS' % (pkg, n[0])) | 1673 | bb.debug(2, '%s: Dependency %s covered by PRIVATE_LIBS' % (pkg, n[0])) |
1674 | continue | 1674 | continue |
1675 | if n[0] in shlib_provider.keys(): | 1675 | if n[0] in shlib_provider.keys(): |
1676 | shlib_provider_path = list() | 1676 | shlib_provider_path = [] |
1677 | for k in shlib_provider[n[0]].keys(): | 1677 | for k in shlib_provider[n[0]].keys(): |
1678 | shlib_provider_path.append(k) | 1678 | shlib_provider_path.append(k) |
1679 | match = None | 1679 | match = None |