diff options
author | Fabio Erculiani <lxnay@gentoo.org> | 2010-04-24 18:02:42 +0000 |
---|---|---|
committer | Fabio Erculiani <lxnay@gentoo.org> | 2010-04-24 18:02:42 +0000 |
commit | 933fda3dedec8af718fdb1abda85db5bd39e1b1e (patch) | |
tree | 585a150bd0f9fb95f0bd09386d25b300bddc9880 /app-misc/beagle/files | |
parent | Marked ~sparc-solaris, bug #314093 (diff) | |
download | gentoo-2-933fda3dedec8af718fdb1abda85db5bd39e1b1e.tar.gz gentoo-2-933fda3dedec8af718fdb1abda85db5bd39e1b1e.tar.bz2 gentoo-2-933fda3dedec8af718fdb1abda85db5bd39e1b1e.zip |
fix compilation issue against sqlite, close #306313
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'app-misc/beagle/files')
-rw-r--r-- | app-misc/beagle/files/beagle-0.3.9-sqlite.patch | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/app-misc/beagle/files/beagle-0.3.9-sqlite.patch b/app-misc/beagle/files/beagle-0.3.9-sqlite.patch new file mode 100644 index 000000000000..251b5517752f --- /dev/null +++ b/app-misc/beagle/files/beagle-0.3.9-sqlite.patch @@ -0,0 +1,93 @@ +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 + +--- +diff --git a/beagle/Util/FSpotTools.cs b/beagle/Util/FSpotTools.cs +index 9470a0a..82f7752 100644 +--- a/beagle/Util/FSpotTools.cs ++++ b/beagle/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 (); +diff --git a/beagle/beagled/SqliteUtils.cs b/beagle/beagled/SqliteUtils.cs +index f4be4c6..f747db5 100644 +--- a/beagle/beagled/SqliteUtils.cs ++++ b/beagle/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 |