[gpodder] - Add patch to fix encoding issues in minidb (rhbz #674758, gPodder #1088)

Ville-Pekka Vainio vpv at fedoraproject.org
Thu Feb 3 16:38:47 UTC 2011


commit 23881c6a10fda8f9140d03427dfc7dee6bc9e738
Author: Ville-Pekka Vainio <vpivaini at cs.helsinki.fi>
Date:   Thu Feb 3 18:38:21 2011 +0200

    - Add patch to fix encoding issues in minidb (rhbz #674758, gPodder #1088)

 ...-b13123d7a105c5f201e9b50e0293a176821dfb8e.patch |   30 ++++++++++++++++++++
 gpodder.spec                                       |    8 ++++-
 2 files changed, 37 insertions(+), 1 deletions(-)
---
diff --git a/gpodder.git-b13123d7a105c5f201e9b50e0293a176821dfb8e.patch b/gpodder.git-b13123d7a105c5f201e9b50e0293a176821dfb8e.patch
new file mode 100644
index 0000000..1bd0b27
--- /dev/null
+++ b/gpodder.git-b13123d7a105c5f201e9b50e0293a176821dfb8e.patch
@@ -0,0 +1,30 @@
+From b13123d7a105c5f201e9b50e0293a176821dfb8e Mon Sep 17 00:00:00 2001
+From: Thomas Perl <m at thp.io>
+Date: Thu, 3 Feb 2011 13:10:07 +0100
+Subject: [PATCH] minidb: Fix encoding issue (bug 1088)
+
+Make sure that utf-8 strings are converted
+to unicode before sending to the database.
+---
+ src/gpodder/minidb.py |    4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/src/gpodder/minidb.py b/src/gpodder/minidb.py
+index 1c7f114..93c1d20 100644
+--- a/src/gpodder/minidb.py
++++ b/src/gpodder/minidb.py
+@@ -85,8 +85,10 @@ class Store(object):
+                         ', '.join('%s TEXT'%s for s in slots)))
+ 
+     def convert(self, v):
+-        if isinstance(v, str) or isinstance(v, unicode):
++        if isinstance(v, unicode):
+             return v
++        elif isinstance(v, str):
++            return v.decode('utf-8')
+         else:
+             return str(v)
+ 
+-- 
+1.6.5.GIT
+
diff --git a/gpodder.spec b/gpodder.spec
index b08ee98..1ece17d 100644
--- a/gpodder.spec
+++ b/gpodder.spec
@@ -3,7 +3,7 @@
 
 Name:           gpodder
 Version:        2.12
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Podcast receiver/catcher written in Python
 
 Group:          Applications/Multimedia
@@ -15,6 +15,8 @@ Patch0:         gpodder-use-system-pymtp.patch
 Patch1:         gpodder.git-68aa84c11c2e1f3cca2bf32b2465c644cfd4cc15.patch
 # Fix broken YouTube search (Maemo bug 11756)
 Patch2:         gpodder.git-75d24ee16d4a9e65fa04a872ddf66117ff5ebdb5.patch
+# minidb: Fix encoding issue (bug 1088)
+Patch3:         gpodder.git-b13123d7a105c5f201e9b50e0293a176821dfb8e.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
 BuildRequires:  python-devel, python-feedparser, python-mygpoclient >= 1.4
@@ -38,6 +40,7 @@ It also optionally supports syncing with ipods.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 # Remove bundled pymtp
 rm src/gpodder/gpopymtp.py
 
@@ -89,6 +92,9 @@ fi
 %{python_sitelib}/%{name}*.egg-info
 
 %changelog
+* Thu Feb 03 2011 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.12-2
+- Add patch to fix encoding issues in minidb (rhbz #674758, gPodder #1088)
+
 * Sat Jan 15 2011 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.12-1
 - New upstream release
 - Add patch to fix exception handling in the 'gpo' command line utility


More information about the scm-commits mailing list