[f-spot] - Add upstream patch to prevent crash with empty databases

chkr chkr at fedoraproject.org
Thu Sep 30 13:26:10 UTC 2010


commit cad079b4e4cd6036aebd5ab4da3dfe3f7ddae166
Author: Christian Krause <chkr at fedoraproject.org>
Date:   Thu Sep 30 07:26:14 2010 -0600

    - Add upstream patch to prevent crash with empty databases

 0001-Don-t-crash-with-empty-databases.patch |   25 +++++++++++++++++++++++++
 f-spot.spec                                 |    9 ++++++++-
 2 files changed, 33 insertions(+), 1 deletions(-)
---
diff --git a/0001-Don-t-crash-with-empty-databases.patch b/0001-Don-t-crash-with-empty-databases.patch
new file mode 100644
index 0000000..05b218b
--- /dev/null
+++ b/0001-Don-t-crash-with-empty-databases.patch
@@ -0,0 +1,25 @@
+From 9054153b3b40f76f7e094ca8db98de0eaca62808 Mon Sep 17 00:00:00 2001
+From: Ruben Vermeersch <ruben at savanne.be>
+Date: Wed, 15 Sep 2010 19:56:40 +0200
+Subject: [PATCH] Don't crash with empty databases.
+
+---
+ src/Clients/MainApp/FSpot/App.cs |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/Clients/MainApp/FSpot/App.cs b/src/Clients/MainApp/FSpot/App.cs
+index cdcfeea..53bdcb4 100644
+--- a/src/Clients/MainApp/FSpot/App.cs
++++ b/src/Clients/MainApp/FSpot/App.cs
+@@ -223,7 +223,7 @@ namespace FSpot
+         {
+             // Some users get wonky URIs here, trying to work around below.
+             // https://bugzilla.gnome.org/show_bug.cgi?id=629248
+-            if (path.StartsWith ("gphoto2:usb:")) {
++            if (path != null && path.StartsWith ("gphoto2:usb:")) {
+                 path = String.Format ("gphoto2://[{0}]", path.Substring (8));
+             }
+ 
+-- 
+1.7.2.3
+
diff --git a/f-spot.spec b/f-spot.spec
index 3e8b9e7..74108b6 100644
--- a/f-spot.spec
+++ b/f-spot.spec
@@ -1,12 +1,15 @@
 Name:           f-spot
 Version:        0.8.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        Photo management application
 
 Group:          Applications/Multimedia
 License:        GPLv2+ and LGPLv2+ and CPL and MIT
 URL:            http://f-spot.org/
 Source0:        http://ftp.gnome.org/pub/gnome/sources/f-spot/0.8/f-spot-%{version}.tar.bz2
+# upstream patch to prevent crash with empty databases
+# http://git.gnome.org/browse/f-spot/patch/?id=9054153b3b40f76f7e094ca8db98de0eaca62808
+Patch1:         0001-Don-t-crash-with-empty-databases.patch
 # unmount cameras before importing
 Patch3:         0002-enhance-the-f-spot-import-script.patch
 
@@ -72,6 +75,7 @@ photo collection in a slideshow as a screensaver.
 
 %prep
 %setup -q
+%patch1 -p1 -b db-fix
 %patch3 -F 2 -p1 -b .gvfs-gphoto
 
 %build
@@ -153,6 +157,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %{_datadir}/applications/screensavers/f-spot-screensaver.desktop
 
 %changelog
+* Thu Sep 30 2010 Christian Krause <chkr at fedoraproject.org> - 0.8.0-2
+- Add upstream patch to prevent crash with empty databases
+
 * Thu Sep 30 2010 Christian Krause <chkr at fedoraproject.org> - 0.8.0-1
 - Add explicit BR for libSM-devel and libICE-devel (BZ 638938)
 - Update to 0.8.0 (BZ 633172)


More information about the scm-commits mailing list