summaryrefslogtreecommitdiffstats
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-05-22 16:09:08 +0100
commitfa2ca7660e8f3279736624aa2493b4ca952ae466 (patch)
tree16bc0c2fe947fc1e0b96845a590ae08aa1941e9b
parent833d4c0fe804a1f7524b3d4b75cbcdd65c31ddac (diff)
downloadopenembedded-core-contrib-fa2ca7660e8f3279736624aa2493b4ca952ae466.tar.gz
openembedded-core-contrib-fa2ca7660e8f3279736624aa2493b4ca952ae466.tar.bz2
openembedded-core-contrib-fa2ca7660e8f3279736624aa2493b4ca952ae466.zip
python-smartpm: Avoid locale issue with bitbake python3
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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 @@
+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}}:"
diff --git a/meta/recipes-devtools/python/python-smartpm_git.bb b/meta/recipes-devtools/python/python-smartpm_git.bb
index 5acfb0aa09..d9fb271228 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 = "\
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"