1 |
lxnay 10/04/24 18:02:42 |
2 |
|
3 |
Added: beagle-0.3.9-sqlite.patch |
4 |
Log: |
5 |
fix compilation issue against sqlite, close #306313 |
6 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 app-misc/beagle/files/beagle-0.3.9-sqlite.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/beagle/files/beagle-0.3.9-sqlite.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/beagle/files/beagle-0.3.9-sqlite.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: beagle-0.3.9-sqlite.patch |
15 |
=================================================================== |
16 |
From 59f63233908b8ccee70251f698351014546d5765 Mon Sep 17 00:00:00 2001 |
17 |
From: Gabriel Burt <gabriel.burt@×××××.com> |
18 |
Date: Thu, 07 Jan 2010 01:08:34 +0000 |
19 |
Subject: Update to build against Mono.Data.Sqlite 2.x |
20 |
|
21 |
--- |
22 |
diff --git a/beagle/Util/FSpotTools.cs b/beagle/Util/FSpotTools.cs |
23 |
index 9470a0a..82f7752 100644 |
24 |
--- a/beagle/Util/FSpotTools.cs |
25 |
+++ b/beagle/Util/FSpotTools.cs |
26 |
@@ -85,8 +85,12 @@ namespace Beagle.Util { |
27 |
while (reader == null) { |
28 |
try { |
29 |
reader = command.ExecuteReader (); |
30 |
- } catch (SqliteBusyException) { |
31 |
- Thread.Sleep (50); |
32 |
+ } catch (SqliteException e) { |
33 |
+ if (e.ErrorCode == SQLiteErrorCode.Busy) { |
34 |
+ Thread.Sleep (50); |
35 |
+ } else { |
36 |
+ throw; |
37 |
+ } |
38 |
} |
39 |
} |
40 |
reader.Close (); |
41 |
diff --git a/beagle/beagled/SqliteUtils.cs b/beagle/beagled/SqliteUtils.cs |
42 |
index f4be4c6..f747db5 100644 |
43 |
--- a/beagle/beagled/SqliteUtils.cs |
44 |
+++ b/beagle/beagled/SqliteUtils.cs |
45 |
@@ -55,8 +55,13 @@ namespace Beagle.Util { |
46 |
try { |
47 |
ret = command.ExecuteNonQuery (); |
48 |
break; |
49 |
- } catch (SqliteBusyException ex) { |
50 |
- Thread.Sleep (50); |
51 |
+ } catch (SqliteException ex) { |
52 |
+ if (ex.ErrorCode == SQLiteErrorCode.Busy) { |
53 |
+ Thread.Sleep (50); |
54 |
+ } else { |
55 |
+ Log.Error (ex, "SQL that caused the exception: {0}", command_text); |
56 |
+ throw; |
57 |
+ } |
58 |
} catch (Exception e) { |
59 |
Log.Error (e, "SQL that caused the exception: {0}", command_text); |
60 |
throw; |
61 |
@@ -79,8 +84,13 @@ namespace Beagle.Util { |
62 |
try { |
63 |
ret = command.ExecuteNonQuery (); |
64 |
break; |
65 |
- } catch (SqliteBusyException ex) { |
66 |
- Thread.Sleep (50); |
67 |
+ } catch (SqliteException ex) { |
68 |
+ if (ex.ErrorCode == SQLiteErrorCode.Busy) { |
69 |
+ Thread.Sleep (50); |
70 |
+ } else { |
71 |
+ Log.Error (ex, "SQL that caused the exception: {0}", command.CommandText); |
72 |
+ throw; |
73 |
+ } |
74 |
} catch (Exception e) { |
75 |
Log.Error ( e, "SQL that caused the exception: {0}", command.CommandText); |
76 |
throw; |
77 |
@@ -96,8 +106,12 @@ namespace Beagle.Util { |
78 |
while (reader == null) { |
79 |
try { |
80 |
reader = command.ExecuteReader (); |
81 |
- } catch (SqliteBusyException ex) { |
82 |
- Thread.Sleep (50); |
83 |
+ } catch (SqliteException ex) { |
84 |
+ if (ex.ErrorCode == SQLiteErrorCode.Busy) { |
85 |
+ Thread.Sleep (50); |
86 |
+ } else { |
87 |
+ throw; |
88 |
+ } |
89 |
} |
90 |
} |
91 |
return reader; |
92 |
@@ -108,8 +122,12 @@ namespace Beagle.Util { |
93 |
while (true) { |
94 |
try { |
95 |
return reader.Read (); |
96 |
- } catch (SqliteBusyException ex) { |
97 |
- Thread.Sleep (50); |
98 |
+ } catch (SqliteException ex) { |
99 |
+ if (ex.ErrorCode == SQLiteErrorCode.Busy) { |
100 |
+ Thread.Sleep (50); |
101 |
+ } else { |
102 |
+ throw; |
103 |
+ } |
104 |
} |
105 |
} |
106 |
} |
107 |
-- |
108 |
cgit v0.8.3.1 |