[Pkg-cli-apps-commits] r3552 - in /packages/f-spot/trunk/debian: changelog patches/00list patches/detect_sqlite2_databases.dpatch

meebey at users.alioth.debian.org meebey at users.alioth.debian.org
Thu Dec 13 21:19:03 UTC 2007


Author: meebey
Date: Thu Dec 13 21:19:03 2007
New Revision: 3552

URL: http://svn.debian.org/wsvn/pkg-cli-apps/?sc=1&rev=3552
Log:
- f-spot 0.4.1-1 prime time!


Added:
    packages/f-spot/trunk/debian/patches/detect_sqlite2_databases.dpatch   (with props)
Modified:
    packages/f-spot/trunk/debian/changelog
    packages/f-spot/trunk/debian/patches/00list

Modified: packages/f-spot/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/f-spot/trunk/debian/changelog?rev=3552&op=diff
==============================================================================
--- packages/f-spot/trunk/debian/changelog (original)
+++ packages/f-spot/trunk/debian/changelog Thu Dec 13 21:19:03 2007
@@ -1,4 +1,4 @@
-f-spot (0.4.1-1~pre4) UNRELEASED; urgency=low
+f-spot (0.4.1-1) unstable; urgency=low
 
   [ Mirco Bauer ]
   * New upstream version.
@@ -24,16 +24,20 @@
   * debian/patches/fix_libfspot_linkage.dpatch
     debian/patches/fix_libfspoteog_linkage.dpatch
     debian/patches/fix_libfspotjpegtran_linkage.dpatch:
-    + Created patch to link correctly against used libraries.
+    + Wrote patch to link correctly against used libraries.
   * debian/patches/20_refresh-menus-on-extensions.dpatch:
     + Refresh the Export and Tools menus on new or removed extensions.
       (upstream SVN revision: 3478)
-      (thanks to Matvey Kozhev <sikon at lucidfox.org> for the dpatch and investigation)
+      (thanks to Matvey Kozhev <sikon at lucidfox.org> for the dpatch and
+       investigation)
   * debian/patches/link_system_libs.dpatch:
     + Link against the Mono.Addins and FlickrNet debian packages instead of the
       bundled versions.
   * debian/patches/forward_port_to_flickrnet_2.1.5.dpatch:
     + API forward port for FlickrNet 2.1.5.
+  * debian/patches/detect_sqlite2_databases.dpatch:
+    + Wrote patch to detect an existing sqlite2 database during startup of
+      f-spot and print out upgrade instructions.
   * debian/rules
     debian/patches/99_ltmain_as-needed.dpatch:
     + Pass --as-needed to linker for lesser dependencies.

Modified: packages/f-spot/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/f-spot/trunk/debian/patches/00list?rev=3552&op=diff
==============================================================================
--- packages/f-spot/trunk/debian/patches/00list (original)
+++ packages/f-spot/trunk/debian/patches/00list Thu Dec 13 21:19:03 2007
@@ -5,4 +5,5 @@
 fix_libfspotjpegtran_linkage
 link_system_libs
 forward_port_to_flickrnet_2.1.5
+detect_sqlite2_databases
 99_ltmain_as-needed

Added: packages/f-spot/trunk/debian/patches/detect_sqlite2_databases.dpatch
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/f-spot/trunk/debian/patches/detect_sqlite2_databases.dpatch?rev=3552&op=file
==============================================================================
--- packages/f-spot/trunk/debian/patches/detect_sqlite2_databases.dpatch (added)
+++ packages/f-spot/trunk/debian/patches/detect_sqlite2_databases.dpatch Thu Dec 13 21:19:03 2007
@@ -1,0 +1,64 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## detect_sqlite2_databases.dpatch by Mirco Bauer <meebey at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad f-spot-0.4.1~/src/Db.cs f-spot-0.4.1/src/Db.cs
+--- f-spot-0.4.1~/src/Db.cs	2007-12-04 13:19:18.000000000 +0100
++++ f-spot-0.4.1/src/Db.cs	2007-12-13 22:10:06.000000000 +0100
+@@ -43,6 +43,12 @@
+ public delegate void ItemsRemovedHandler (object sender, DbItemEventArgs args);
+ public delegate void ItemsChangedHandler (object sender, DbItemEventArgs args);
+ 
++public class DbException : ApplicationException {
++	public DbException(string msg) : base(msg)
++	{
++	}
++}
++
+ public abstract class DbStore {
+ 	// DbItem cache.
+ 
+@@ -235,7 +241,12 @@
+ 		if (new_db && ! create_if_missing)
+ 			throw new Exception (path + ": File not found");
+ 
+-		database = new QueuedSqliteDatabase(path);	
++		database = new QueuedSqliteDatabase(path);
++		if (database.GetFileVersion(path) == 2) {
++			throw new DbException("sqlite2 database detected, bailing out!\n" +
++				"You need to upgrade your f-spot sqlite2 database to sqlite3 by using the f-spot-sqlite-upgrade script.\n" +
++				"On Debian systems you need to install sqlite and sqlite3 packages using APT before you run the upgrade script.");
++		}
+ 
+ 		// Load or create the meta table
+  		meta_store = new MetaStore (Database, new_db);
+diff -urNad f-spot-0.4.1~/src/QueuedSqliteDatabase.cs f-spot-0.4.1/src/QueuedSqliteDatabase.cs
+--- f-spot-0.4.1~/src/QueuedSqliteDatabase.cs	2007-12-04 13:19:18.000000000 +0100
++++ f-spot-0.4.1/src/QueuedSqliteDatabase.cs	2007-12-13 22:10:06.000000000 +0100
+@@ -266,7 +266,7 @@
+             connection.Close();
+         }
+ 
+-        private int GetFileVersion(string path) 
++        public int GetFileVersion(string path) 
+         {
+             if (!File.Exists(path)) {
+                 return 3;
+diff -urNad f-spot-0.4.1~/src/main.cs f-spot-0.4.1/src/main.cs
+--- f-spot-0.4.1~/src/main.cs	2007-12-04 13:19:18.000000000 +0100
++++ f-spot-0.4.1/src/main.cs	2007-12-13 22:10:28.000000000 +0100
+@@ -176,6 +176,11 @@
+ 
+ 					if (core != null)
+ 						core.UnregisterServer ();
++
++					// if there is a problem with the DB, so is no way we can survive
++					if (e is DbException) {
++						throw;
++					}
+ 				}
+ 				if (control == null)
+ 					System.Console.WriteLine ("Can't get a connection to the dbus. Trying again...");

Propchange: packages/f-spot/trunk/debian/patches/detect_sqlite2_databases.dpatch
------------------------------------------------------------------------------
    svn:executable = *




More information about the Pkg-cli-apps-commits mailing list