[gnome-games/f16] add patch so we work with the latest pygobject in rawhide and f16
John Palmieri (J5)
johnp at fedoraproject.org
Mon Jan 2 19:14:36 UTC 2012
commit 59efe0b1ab142ad85cd1ae01258f9033ce46ef15
Author: John (J5) Palmieri <johnp at redhat.com>
Date: Mon Jan 2 14:05:57 2012 -0500
add patch so we work with the latest pygobject in rawhide and f16
...eck-so-gnome-sudoku-works-with-pygobject-.patch | 33 ++++++++++++++++++++
gnome-games.spec | 6 +++
2 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/0001-fix-type-check-so-gnome-sudoku-works-with-pygobject-.patch b/0001-fix-type-check-so-gnome-sudoku-works-with-pygobject-.patch
new file mode 100644
index 0000000..ab69805
--- /dev/null
+++ b/0001-fix-type-check-so-gnome-sudoku-works-with-pygobject-.patch
@@ -0,0 +1,33 @@
+From 8ab5a3a28281e6b1b649d9ef93628b3433ddd887 Mon Sep 17 00:00:00 2001
+From: "John (J5) Palmieri" <johnp at redhat.com>
+Date: Mon, 2 Jan 2012 13:39:05 -0500
+Subject: [PATCH] fix type check so gnome-sudoku works with pygobject >= 3.0.3
+
+gnome-sudoku was using if type(grid) == str to check if it needed
+to convert the game board to a list. Unicode fixes in the latest
+pygobject returns unicode strings for any string stored in a
+TreeStore. The fix was to correctly check for any string using
+isinstance(grid, basestring)
+
+Note this will not work in python3 so needs to be looked at when
+porting
+---
+ gnome-sudoku/src/lib/sudoku.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/gnome-sudoku/src/lib/sudoku.py b/gnome-sudoku/src/lib/sudoku.py
+index a345593..7d28608 100644
+--- a/gnome-sudoku/src/lib/sudoku.py
++++ b/gnome-sudoku/src/lib/sudoku.py
+@@ -130,7 +130,7 @@ class SudokuGrid(object):
+ for n, col in enumerate([[(x, y) for y in range(self.group_size)] for x in range(self.group_size)]):
+ self.col_coords[n] = col
+ if grid:
+- if type(grid) == str:
++ if isinstance(grid, basestring):
+ g = re.split("\s+", grid)
+ side = int(math.sqrt(len(g)))
+ grid = []
+--
+1.7.7.4
+
diff --git a/gnome-games.spec b/gnome-games.spec
index 390c986..ae259b0 100644
--- a/gnome-games.spec
+++ b/gnome-games.spec
@@ -48,6 +48,8 @@ License: GPLv2+ and GPLv3 and GFDL
Group: Amusements/Games
#VCS: git:git://git.gnome.org/gnome-games
Source: http://download.gnome.org/sources/gnome-games/3.2/gnome-games-%{version}.tar.xz
+# patch is upstream
+Patch0: 0001-fix-type-check-so-gnome-sudoku-works-with-pygobject-.patch
Obsoletes: gnome-games-devel < %{epoch}:%{version}-%{release}
URL: http://projects.gnome.org/gnome-games/
@@ -135,6 +137,7 @@ This package contains user documentation for %{name}.
%prep
%setup -q
+%patch0 -p1 -b .fix-type-check
autoreconf -i -f
@@ -443,6 +446,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas || :
%changelog
+* Mon Jan 02 2012 John (J5) Palmieri <johnp at redhat.com> - 1:3.2.1-3
+- add patch which fixes type check bug to work with newer PyGObject
+
* Wed Oct 26 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1:3.2.1-2
- Rebuilt for glibc bug#747377
More information about the scm-commits
mailing list