summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-19 15:00:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-23 15:27:05 +0100
commit62696defc015fad0784c6241d16b9da173d32a10 (patch)
treeb42d7b430d34280734a8618e19a0c75276a78c3a /meta/recipes-devtools
parentdeca0d37367cfd6eed7e776db9fd41b3eb906c23 (diff)
downloadpoky-62696defc015fad0784c6241d16b9da173d32a10.tar.gz
python-smartpm: Avoid locale issue with bitbake python3
(From OE-Core rev: fa2ca7660e8f3279736624aa2493b4ca952ae466) (From OE-Core rev: 6c756fe2a61843050debd06d7194e6441c26cb20) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-locale.patch27
-rw-r--r--meta/recipes-devtools/python/python-smartpm_git.bb1
2 files changed, 28 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 @@
1rpm or commands run by rpm can use output which isn't strictly acsii such
2as quotation characters around expression which are character 0xe2.
3
4Use utf-8 as an encoding rather than whatever the system suggests to
5ensure smart copes with this rather than erroring with unicode errors.
6
7RP 2016/5/19
8Upstream-Status: Pending
9
10
11Index: 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}}:"
diff --git a/meta/recipes-devtools/python/python-smartpm_git.bb b/meta/recipes-devtools/python/python-smartpm_git.bb
index f030b3eb37..5662bacf02 100644
--- a/meta/recipes-devtools/python/python-smartpm_git.bb
+++ b/meta/recipes-devtools/python/python-smartpm_git.bb
@@ -24,6 +24,7 @@ SRC_URI = "\
24 file://smart-set-noprogress-for-pycurl.patch \ 24 file://smart-set-noprogress-for-pycurl.patch \
25 file://smart-cache.py-getPackages-matches-name-version.patch \ 25 file://smart-cache.py-getPackages-matches-name-version.patch \
26 file://smart-channel-remove-all.patch \ 26 file://smart-channel-remove-all.patch \
27 file://smart-locale.patch \
27 " 28 "
28 29
29SRCREV = "407a7eca766431257dcd1da15175cc36a1bb22d0" 30SRCREV = "407a7eca766431257dcd1da15175cc36a1bb22d0"