]> git.pld-linux.org Git - packages/beagle.git/commitdiff
- fixes build with Mono.Data.Sqlite 2.x
authorMarcin Banasiak <marcin.banasiak@gmail.com>
Fri, 12 Mar 2010 11:50:35 +0000 (11:50 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    beagle-sqlite.patch -> 1.1

beagle-sqlite.patch [new file with mode: 0644]

diff --git a/beagle-sqlite.patch b/beagle-sqlite.patch
new file mode 100644 (file)
index 0000000..ddeb1d3
--- /dev/null
@@ -0,0 +1,91 @@
+From 59f63233908b8ccee70251f698351014546d5765 Mon Sep 17 00:00:00 2001
+From: Gabriel Burt <gabriel.burt@gmail.com>
+Date: Thu, 07 Jan 2010 01:08:34 +0000
+Subject: Update to build against Mono.Data.Sqlite 2.x
+
+---
+index 9470a0a..82f7752 100644
+--- a/Util/FSpotTools.cs
++++ b/Util/FSpotTools.cs
+@@ -85,8 +85,12 @@ namespace Beagle.Util {
+                                                       while (reader == null) {
+                                                               try {
+                                                                       reader = command.ExecuteReader ();
+-                                                              } catch (SqliteBusyException) {
+-                                                                      Thread.Sleep (50);
++                                                              } catch (SqliteException e) {
++                                                                      if (e.ErrorCode == SQLiteErrorCode.Busy) {
++                                                                              Thread.Sleep (50);
++                                                                      } else {
++                                                                              throw;
++                                                                      }
+                                                               }
+                                                       }
+                                                       reader.Close ();
+index f4be4c6..f747db5 100644
+--- a/beagled/SqliteUtils.cs
++++ b/beagled/SqliteUtils.cs
+@@ -55,8 +55,13 @@ namespace Beagle.Util {
+                                       try {
+                                               ret = command.ExecuteNonQuery ();
+                                               break;
+-                                      } catch (SqliteBusyException ex) {
+-                                              Thread.Sleep (50);
++                                      } catch (SqliteException ex) {
++                                              if (ex.ErrorCode == SQLiteErrorCode.Busy) {
++                                                      Thread.Sleep (50);
++                                              } else {
++                                                      Log.Error (ex, "SQL that caused the exception: {0}", command_text);
++                                                      throw;
++                                              }
+                                       } catch (Exception e) {
+                                               Log.Error (e, "SQL that caused the exception: {0}", command_text);
+                                               throw;
+@@ -79,8 +84,13 @@ namespace Beagle.Util {
+                               try {
+                                       ret = command.ExecuteNonQuery ();
+                                       break;
+-                              } catch (SqliteBusyException ex) {
+-                                      Thread.Sleep (50);
++                              } catch (SqliteException ex) {
++                                      if (ex.ErrorCode == SQLiteErrorCode.Busy) {
++                                              Thread.Sleep (50);
++                                      } else {
++                                              Log.Error (ex, "SQL that caused the exception: {0}", command.CommandText);
++                                              throw;
++                                      }
+                               } catch (Exception e) {
+                                       Log.Error ( e, "SQL that caused the exception: {0}", command.CommandText);
+                                       throw;
+@@ -96,8 +106,12 @@ namespace Beagle.Util {
+                       while (reader == null) {
+                               try {
+                                       reader = command.ExecuteReader ();
+-                              } catch (SqliteBusyException ex) {
+-                                      Thread.Sleep (50);
++                              } catch (SqliteException ex) {
++                                      if (ex.ErrorCode == SQLiteErrorCode.Busy) {
++                                              Thread.Sleep (50);
++                                      } else {
++                                              throw;
++                                      }
+                               }
+                       }
+                       return reader;
+@@ -108,8 +122,12 @@ namespace Beagle.Util {
+                       while (true) {
+                               try {
+                                       return reader.Read ();
+-                              } catch (SqliteBusyException ex) {
+-                                      Thread.Sleep (50);
++                              } catch (SqliteException ex) {
++                                      if (ex.ErrorCode == SQLiteErrorCode.Busy) {
++                                              Thread.Sleep (50);
++                                      } else {
++                                              throw;
++                                      }
+                               }
+                       }
+               }
+--
+cgit v0.8.3.1
This page took 0.071071 seconds and 4 git commands to generate.