diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-19 15:00:57 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-22 16:11:12 +0100 |
commit | 66b484fbc6190b4c99e5428ad26c0ce984e57eaf (patch) | |
tree | 2105a0eba78f9dc9278142b89110600a852cdc98 /meta/recipes-devtools/python/python-smartpm | |
parent | d57de67357a4cd3da2824f8bd2b02d100f1ac9c3 (diff) | |
download | poky-66b484fbc6190b4c99e5428ad26c0ce984e57eaf.tar.gz |
python-smartpm: Avoid locale issue with bitbake python3
(From OE-Core rev: fa2ca7660e8f3279736624aa2493b4ca952ae466)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python-smartpm')
-rw-r--r-- | meta/recipes-devtools/python/python-smartpm/smart-locale.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-locale.patch b/meta/recipes-devtools/python/python-smartpm/smart-locale.patch new file mode 100644 index 0000000000..0f1dfb91d5 --- /dev/null +++ b/meta/recipes-devtools/python/python-smartpm/smart-locale.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | rpm or commands run by rpm can use output which isn't strictly acsii such | ||
2 | as quotation characters around expression which are character 0xe2. | ||
3 | |||
4 | Use utf-8 as an encoding rather than whatever the system suggests to | ||
5 | ensure smart copes with this rather than erroring with unicode errors. | ||
6 | |||
7 | RP 2016/5/19 | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | |||
11 | Index: git/smart/backends/rpm/pm.py | ||
12 | =================================================================== | ||
13 | --- git.orig/smart/backends/rpm/pm.py | ||
14 | +++ git/smart/backends/rpm/pm.py | ||
15 | @@ -32,11 +32,7 @@ from smart.pm import PackageManager | ||
16 | from smart import sysconf, iface, Error, _ | ||
17 | |||
18 | |||
19 | -try: | ||
20 | - ENCODING = locale.getpreferredencoding() | ||
21 | -except locale.Error: | ||
22 | - ENCODING = "ascii" | ||
23 | - | ||
24 | +ENCODING = "utf-8" | ||
25 | |||
26 | def get_public_key(header): | ||
27 | return header.sprintf("%|DSAHEADER?{%{DSAHEADER:pgpsig}}:" | ||