]> code.ossystems Code Review - openembedded-core.git/commitdiff
python-smartpm: Avoid locale issue with bitbake python3
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 May 2016 14:00:57 +0000 (15:00 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 23 Sep 2016 14:26:15 +0000 (15:26 +0100)
(From OE-Core rev: fa2ca7660e8f3279736624aa2493b4ca952ae466)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
meta/recipes-devtools/python/python-smartpm/smart-locale.patch [new file with mode: 0644]
meta/recipes-devtools/python/python-smartpm_git.bb

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 (file)
index 0000000..0f1dfb9
--- /dev/null
@@ -0,0 +1,27 @@
+rpm or commands run by rpm can use output which isn't strictly acsii such
+as quotation characters around expression which are character 0xe2.
+
+Use utf-8 as an encoding rather than whatever the system suggests to
+ensure smart copes with this rather than erroring with unicode errors.
+
+RP 2016/5/19
+Upstream-Status: Pending
+
+
+Index: git/smart/backends/rpm/pm.py
+===================================================================
+--- git.orig/smart/backends/rpm/pm.py
++++ git/smart/backends/rpm/pm.py
+@@ -32,11 +32,7 @@ from smart.pm import PackageManager
+ from smart import sysconf, iface, Error, _
+-try:
+-    ENCODING = locale.getpreferredencoding()
+-except locale.Error:
+-    ENCODING = "ascii"
+-
++ENCODING = "utf-8"
+ def get_public_key(header):
+     return header.sprintf("%|DSAHEADER?{%{DSAHEADER:pgpsig}}:"
index f030b3eb37c43c7cd42b5ae34c21107165e6713d..5662bacf028993cf850b31caf254c212624bf62d 100644 (file)
@@ -24,6 +24,7 @@ SRC_URI = "\
           file://smart-set-noprogress-for-pycurl.patch \
           file://smart-cache.py-getPackages-matches-name-version.patch \
           file://smart-channel-remove-all.patch \
+          file://smart-locale.patch \
          "
 
 SRCREV = "407a7eca766431257dcd1da15175cc36a1bb22d0"