[f-spot] Remove the disabled SQLite upgrader.



commit 0ac24a5b54fe24608947fc741faa12a5d66146f5
Author: Ruben Vermeersch <ruben savanne be>
Date:   Wed Jul 21 17:19:17 2010 +0200

    Remove the disabled SQLite upgrader.
    
    We've shipped this code for two years. Hyena only support sqlite3, so
    will we.

 src/Db.cs |   41 -----------------------------------------
 1 files changed, 0 insertions(+), 41 deletions(-)
---
diff --git a/src/Db.cs b/src/Db.cs
index 599cb08..a654d0f 100644
--- a/src/Db.cs
+++ b/src/Db.cs
@@ -215,11 +215,6 @@ public class Db : IDisposable {
 		if (new_db && ! create_if_missing)
 			throw new Exception (path + ": File not found");
 
-//		database = new QueuedSqliteDatabase(path);
-//		database.ExceptionThrown += HandleDbException;
-
-//		if (database.GetFileVersion(path) == 2)
-//			SqliteUpgrade ();
 		database = new FSpotDatabaseConnection (path);
 
 		// Load or create the meta table
@@ -287,42 +282,6 @@ public class Db : IDisposable {
 	{
 		Database.RollbackTransaction ();
 	}
-
-	private void SqliteUpgrade ()
-	{
-		//Close the db
-		database.Dispose();
-
-		string upgrader_path = null;
-		string [] possible_paths = {
-			Path.Combine (Defines.BINDIR, "f-spot-sqlite-upgrade"),
-			"../tools/f-spot-sqlite-upgrade",
-			"/usr/local/bin/f-spot-sqlite-upgrade",
-			"/usr/bin/f-spot-sqlite-upgrade",
-		};
-
-		foreach (string p in possible_paths)
-			if (File.Exists (p)) {
-				upgrader_path = p;
-				break;
-			}
-
-		if (upgrader_path == null)
-			throw new DbException ("Failed to upgrade the f-spot sqlite2 database to sqlite3!\n" + "Unable to find the f-spot-sqlite-upgrade script on your system");
-
-		Log.DebugFormat ("Running {0}...", upgrader_path);
-		ProcessStartInfo updaterInfo = new ProcessStartInfo (upgrader_path);
-		updaterInfo.UseShellExecute = false;
-		updaterInfo.RedirectStandardError = true;
-		Process updater = Process.Start (updaterInfo);
-		string stdError = updater.StandardError.ReadToEnd ();
-		updater.WaitForExit ();
-		if (updater.ExitCode != 0)
-			throw new DbException("Failed to upgrade the f-spot sqlite2 database to sqlite3!\n" + stdError);
-
-		//Re-open the db
-		database = new FSpotDatabaseConnection (path);
-	}
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]