[childsplay] Fix childsplay no longer working due to the new 0.7 sqlalchemey (rhbz#767799)
Hans de Goede
jwrdegoede at fedoraproject.org
Thu Dec 15 10:56:49 UTC 2011
commit bad2f0e2cd6b079a9b18194c49340bc6215a5f82
Author: Hans de Goede <hdegoede at redhat.com>
Date: Thu Dec 15 11:57:42 2011 +0100
Fix childsplay no longer working due to the new 0.7 sqlalchemey (rhbz#767799)
childsplay-fix-sqlalchemy-exceptions-import.patch | 22 ++++++++++++++++
childsplay.spec | 28 +++++++++-----------
2 files changed, 35 insertions(+), 15 deletions(-)
---
diff --git a/childsplay-fix-sqlalchemy-exceptions-import.patch b/childsplay-fix-sqlalchemy-exceptions-import.patch
new file mode 100644
index 0000000..6dd10a7
--- /dev/null
+++ b/childsplay-fix-sqlalchemy-exceptions-import.patch
@@ -0,0 +1,22 @@
+--- childsplay-1.6/SPDataManager.py 2010-05-20 07:44:00.000000000 +0200
++++ childsplay-1.6/SPDataManager.py 2011-08-21 16:23:21.870061695 +0200
+@@ -38,7 +38,7 @@
+
+ try:
+ import sqlalchemy as sqla
+- import sqlalchemy.exceptions as sqlae
++ from sqlalchemy import exc as sqlae
+ import SQLTables
+ except ImportError:
+ module_logger.exception("No sqlalchemy package found")
+--- childsplay-1.6/SPMainCore.py~ 2011-06-03 13:24:28.000000000 +0200
++++ childsplay-1.6/SPMainCore.py 2011-12-15 11:50:56.590947343 +0100
+@@ -197,7 +197,7 @@ class MainCoreGui:
+ # get a datamanager which will also handle the login screen
+ try:
+ self.dm = SPDataManager.DataManager(self.spgoodies)
+- except sqla_exceptions.SQLError:
++ except sqla_exceptions.SQLAlchemyError:
+ self.logger.exception("Error while handeling the dbase, try removing the existing dbase")
+ # setup misc stuff
+
diff --git a/childsplay.spec b/childsplay.spec
index 375bdc9..9602c5b 100644
--- a/childsplay.spec
+++ b/childsplay.spec
@@ -4,7 +4,7 @@
Name: childsplay
Version: 1.6
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Suite of educational games for young children
Group: Amusements/Games
License: GPLv3
@@ -27,8 +27,8 @@ Source22: http://downloads.sourceforge.net/schoolsplay/alphabet_sounds_ro-
Source23: http://downloads.sourceforge.net/schoolsplay/alphabet_sounds_ru-%{alphabet_ver}.tgz
Source24: http://downloads.sourceforge.net/schoolsplay/alphabet_sounds_sl-%{alphabet_ver}.tgz
Source25: http://downloads.sourceforge.net/schoolsplay/alphabet_sounds_sv-%{alphabet_ver}.tgz
+Patch0: childsplay-fix-sqlalchemy-exceptions-import.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: desktop-file-utils
BuildRequires: python
@@ -204,6 +204,7 @@ Swedish alphabet sounds for Childsplay
%prep
%setup -q -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19 -a 20 -a 21 -a 22 -a 23 -a 24 -a 25
+%patch0 -p1 -z .sqlalchemy
# we don't use the buggy provided install
rm setup.py
rm `find alphabet_sounds_??-%{alphabet_ver} -name install.py`
@@ -232,7 +233,6 @@ echo "LOCALEDIR = '%{_datadir}/locale'" >> SPBasePaths.py
%install
-rm -rf $RPM_BUILD_ROOT
# setup.py is not really usable for our needs
mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{python_sitedir}/%{realname}/lib
@@ -282,25 +282,20 @@ cp -a alphabet_sounds_el-%{old_alphabet_ver}/AlphabetSounds/el $RPM_BUILD_ROOT%{
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
%post
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
-touch --no-create %{_datadir}/icons/hicolor || :
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
- %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+if [ $1 -eq 0 ] ; then
+ touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
%files -f %{realname}.lang
-%defattr(-, root, root, -)
%doc Changelog COPYING doc/* README
%{_bindir}/%{name}
%dir %{_datadir}/%{realname}
@@ -422,6 +417,9 @@ fi
%changelog
+* Thu Dec 15 2011 Hans de Goede <hdegoede at redhat.com> - 1.6-3
+- Fix childsplay no longer working due to the new 0.7 sqlalchemey (rhbz#767799)
+
* Fri Jun 17 2011 Jon Ciesla <limb at jcomserv.net> - 1.6-2
- Bump and rebuild for BZ 712251,
More information about the scm-commits
mailing list