Bring a patch from upstream to fix a hard crash with the -evolution
subpackage. Sync the tracker_file_open_fd patches with upstream. ok sthen@
This commit is contained in:
parent
850003653b
commit
593772291e
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.93 2012/01/22 15:13:23 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.94 2012/02/02 07:12:23 ajacoutot Exp $
|
||||
|
||||
# XXX Binary files patch-src_tracker-control_tracker-control-general_c
|
||||
# and patch-src_tracker-control_tracker-control-general_c.new differ
|
||||
@ -21,7 +21,8 @@ PKGNAME-main= meta-tracker-${VERSION}
|
||||
PKGNAME-evolution= evolution-meta-tracker-${VERSION}
|
||||
PKGNAME-nautilus= nautilus-meta-tracker-${VERSION}
|
||||
|
||||
REVISION-main= 4
|
||||
REVISION-main= 5
|
||||
REVISION-evolution=0
|
||||
|
||||
MAJ_V= ${GNOME_VERSION:C/^([0-9]+\.[0-9]+).*/\1/}
|
||||
EVO_VERSION= 3.2
|
||||
|
@ -1,20 +1,26 @@
|
||||
$OpenBSD: patch-src_libtracker-common_tracker-file-utils_c,v 1.3 2012/01/22 15:13:23 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_libtracker-common_tracker-file-utils_c,v 1.4 2012/02/02 07:12:23 ajacoutot Exp $
|
||||
|
||||
From a6ae1d90385b7eb9c4a5bd6a9ca17eb32b666b04 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
Date: Tue, 10 Jan 2012 11:45:29 +0000
|
||||
Subject: libtracker-common: Add new function tracker_file_open_fd()
|
||||
|
||||
--- src/libtracker-common/tracker-file-utils.c.orig Fri Dec 16 17:08:04 2011
|
||||
+++ src/libtracker-common/tracker-file-utils.c Tue Jan 10 09:51:39 2012
|
||||
+++ src/libtracker-common/tracker-file-utils.c Mon Jan 30 17:34:23 2012
|
||||
@@ -50,22 +50,34 @@
|
||||
|
||||
static GHashTable *file_locks = NULL;
|
||||
|
||||
-FILE *
|
||||
-tracker_file_open (const gchar *path)
|
||||
+gint
|
||||
+int
|
||||
+tracker_file_open_fd (const gchar *path)
|
||||
{
|
||||
- FILE *file;
|
||||
- int fd;
|
||||
+ gint fd;
|
||||
int fd;
|
||||
|
||||
g_return_val_if_fail (path != NULL, NULL);
|
||||
- g_return_val_if_fail (path != NULL, NULL);
|
||||
+ g_return_val_if_fail (path != NULL, -1);
|
||||
|
||||
#if defined(__linux__)
|
||||
- fd = g_open (path, O_RDONLY | O_NOATIME);
|
||||
@ -35,7 +41,7 @@ $OpenBSD: patch-src_libtracker-common_tracker-file-utils_c,v 1.3 2012/01/22 15:1
|
||||
+tracker_file_open (const gchar *path)
|
||||
+{
|
||||
+ FILE *file;
|
||||
+ gint fd;
|
||||
+ int fd;
|
||||
+
|
||||
+ g_return_val_if_fail (path != NULL, NULL);
|
||||
+
|
||||
|
@ -1,11 +1,17 @@
|
||||
$OpenBSD: patch-src_libtracker-common_tracker-file-utils_h,v 1.1 2012/01/22 15:13:23 ajacoutot Exp $
|
||||
--- src/libtracker-common/tracker-file-utils.h.orig Tue Jan 10 09:16:39 2012
|
||||
+++ src/libtracker-common/tracker-file-utils.h Tue Jan 10 09:17:10 2012
|
||||
$OpenBSD: patch-src_libtracker-common_tracker-file-utils_h,v 1.2 2012/02/02 07:12:23 ajacoutot Exp $
|
||||
|
||||
From a6ae1d90385b7eb9c4a5bd6a9ca17eb32b666b04 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
Date: Tue, 10 Jan 2012 11:45:29 +0000
|
||||
Subject: libtracker-common: Add new function tracker_file_open_fd()
|
||||
|
||||
--- src/libtracker-common/tracker-file-utils.h.orig Fri Dec 16 16:24:23 2011
|
||||
+++ src/libtracker-common/tracker-file-utils.h Mon Jan 30 17:34:23 2012
|
||||
@@ -32,6 +32,7 @@ G_BEGIN_DECLS
|
||||
#endif
|
||||
|
||||
/* File utils */
|
||||
+gint tracker_file_open_fd (const gchar *path);
|
||||
+int tracker_file_open_fd (const gchar *path);
|
||||
FILE* tracker_file_open (const gchar *path);
|
||||
void tracker_file_close (FILE *file,
|
||||
gboolean need_again_soon);
|
||||
|
@ -0,0 +1,124 @@
|
||||
$OpenBSD: patch-src_plugins_evolution_tracker-evolution-plugin_c,v 1.4 2012/02/02 07:12:23 ajacoutot Exp $
|
||||
|
||||
From 396c1eaece1756a68441ebf49ba0de36949e9790 Mon Sep 17 00:00:00 2001
|
||||
From: Philip Van Hoof <philip@codeminded.be>
|
||||
Date: Tue, 06 Dec 2011 14:53:09 +0000
|
||||
Subject: plugins/evolution: Fixes for several crashes in the plugin
|
||||
|
||||
--- src/plugins/evolution/tracker-evolution-plugin.c.orig Fri Dec 16 16:23:55 2011
|
||||
+++ src/plugins/evolution/tracker-evolution-plugin.c Tue Jan 31 09:54:53 2012
|
||||
@@ -109,18 +109,6 @@
|
||||
* during registration of accounts and folders). I know this is cruel. I know. */
|
||||
|
||||
typedef struct {
|
||||
- TrackerSparqlConnection *connection;
|
||||
- gchar *sparql;
|
||||
- gboolean commit;
|
||||
- gint prio;
|
||||
- GMutex *mutex;
|
||||
- GCond *cond;
|
||||
- gboolean has_happened;
|
||||
- gpointer pool;
|
||||
- gboolean dont_free;
|
||||
-} PoolItem;
|
||||
-
|
||||
-typedef struct {
|
||||
GThreadPool *pool;
|
||||
GList *items;
|
||||
GMutex *mutex;
|
||||
@@ -293,7 +281,6 @@ thread_pool_exec (gpointer data,
|
||||
gpointer user_data)
|
||||
{
|
||||
ThreadPool *pool = user_data;
|
||||
- PoolItem *item;
|
||||
gboolean dying;
|
||||
|
||||
g_mutex_lock (pool->mutex);
|
||||
@@ -304,9 +291,7 @@ thread_pool_exec (gpointer data,
|
||||
if (!dying)
|
||||
pool->func (data, pool->cancel);
|
||||
|
||||
- item = data;
|
||||
- if (!item->dont_free)
|
||||
- pool->freeup (data, pool->cancel);
|
||||
+ pool->freeup (data, pool->cancel);
|
||||
}
|
||||
|
||||
static ThreadPool*
|
||||
@@ -908,6 +893,13 @@ introduce_walk_folders_in_folder (TrackerMinerEvolutio
|
||||
sqlite3_stmt *stmt = NULL;
|
||||
GPtrArray *uids = g_ptr_array_new_with_free_func (g_free);
|
||||
|
||||
+ /* might happen when folder is not loaded/opened yet */
|
||||
+ if (!priv->cached_folders || !g_hash_table_lookup (priv->cached_folders, iter->full_name)) {
|
||||
+ iter = iter->next;
|
||||
+ g_ptr_array_unref (uids);
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
did_work = TRUE;
|
||||
|
||||
query = sqlite3_mprintf ("SELECT uid FROM %Q "
|
||||
@@ -1215,8 +1207,13 @@ introduce_store_deal_with_deleted (TrackerMinerEvoluti
|
||||
uid = (const gchar *) sqlite3_column_text (stmt, 0);
|
||||
mailbox = (const gchar *) sqlite3_column_text (stmt, 1);
|
||||
|
||||
- folder = g_hash_table_lookup (priv->cached_folders, mailbox);
|
||||
+ folder = priv->cached_folders ? g_hash_table_lookup (priv->cached_folders, mailbox) : NULL;
|
||||
|
||||
+ /* might happen when folder is not loaded/opened yet */
|
||||
+ if (!folder) {
|
||||
+ more = FALSE;
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
/* This is not a path but a URI, don't use the OS's
|
||||
* directory separator here */
|
||||
@@ -1411,7 +1408,7 @@ register_walk_folders_in_folder (TrackerMinerEvolution
|
||||
|
||||
priv->cached_folders = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
(GDestroyNotify) g_free,
|
||||
- (GDestroyNotify) NULL);
|
||||
+ (GDestroyNotify) g_object_unref);
|
||||
}
|
||||
|
||||
/* Recursively walks all the folders in store */
|
||||
@@ -1505,6 +1502,8 @@ unregister_on_get_folder (gchar *uri,
|
||||
g_free (info->account_uri);
|
||||
g_object_unref (info->self);
|
||||
g_free (info);
|
||||
+
|
||||
+ g_object_unref (folder);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1753,7 +1752,9 @@ introduce_account_to (TrackerMinerEvolution *self,
|
||||
mail_get_folderinfo (store, NULL, on_got_folderinfo_introduce, intro_info);
|
||||
#endif
|
||||
|
||||
+#ifndef EVOLUTION_SHELL_3_2
|
||||
g_object_unref (store);
|
||||
+#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -2085,7 +2086,9 @@ register_account (TrackerMinerEvolution *self,
|
||||
mail_get_folderinfo (store, NULL, on_got_folderinfo_register, reg_info);
|
||||
#endif
|
||||
|
||||
+#ifndef EVOLUTION_SHELL_3_2
|
||||
g_object_unref (store);
|
||||
+#endif
|
||||
}
|
||||
|
||||
#ifdef EVOLUTION_SHELL_3_2
|
||||
@@ -2181,7 +2184,9 @@ unregister_account (TrackerMinerEvolution *self,
|
||||
mail_get_folderinfo (store, NULL, on_got_folderinfo_unregister, reg_info);
|
||||
#endif
|
||||
|
||||
+#ifndef EVOLUTION_SHELL_3_2
|
||||
g_object_unref (store);
|
||||
+#endif
|
||||
}
|
||||
|
||||
static void
|
@ -1,9 +1,12 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-abw_c,v 1.7 2012/01/22 15:13:23 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-abw_c,v 1.8 2012/02/02 07:12:23 ajacoutot Exp $
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=666654
|
||||
From a6ae1d90385b7eb9c4a5bd6a9ca17eb32b666b04 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
Date: Tue, 10 Jan 2012 11:45:29 +0000
|
||||
Subject: libtracker-common: Add new function tracker_file_open_fd()
|
||||
|
||||
--- src/tracker-extract/tracker-extract-abw.c.orig Fri Dec 16 16:24:23 2011
|
||||
+++ src/tracker-extract/tracker-extract-abw.c Tue Jan 10 09:19:28 2012
|
||||
+++ src/tracker-extract/tracker-extract-abw.c Mon Jan 30 17:34:23 2012
|
||||
@@ -180,10 +180,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info
|
||||
f = tracker_extract_info_get_file (info);
|
||||
filename = g_file_get_path (f);
|
||||
|
@ -1,9 +1,12 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-gif_c,v 1.4 2012/01/22 15:13:23 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-gif_c,v 1.5 2012/02/02 07:12:23 ajacoutot Exp $
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=666654
|
||||
From a6ae1d90385b7eb9c4a5bd6a9ca17eb32b666b04 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
Date: Tue, 10 Jan 2012 11:45:29 +0000
|
||||
Subject: libtracker-common: Add new function tracker_file_open_fd()
|
||||
|
||||
--- src/tracker-extract/tracker-extract-gif.c.orig Fri Dec 16 16:24:23 2011
|
||||
+++ src/tracker-extract/tracker-extract-gif.c Tue Jan 10 09:19:45 2012
|
||||
+++ src/tracker-extract/tracker-extract-gif.c Mon Jan 30 17:34:23 2012
|
||||
@@ -606,10 +606,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1,6 +1,14 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-mp3_c,v 1.11 2012/01/22 15:13:23 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-mp3_c,v 1.12 2012/02/02 07:12:23 ajacoutot Exp $
|
||||
|
||||
OpenBSD does not have memmem().
|
||||
|
||||
From a6ae1d90385b7eb9c4a5bd6a9ca17eb32b666b04 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
Date: Tue, 10 Jan 2012 11:45:29 +0000
|
||||
Subject: libtracker-common: Add new function tracker_file_open_fd()
|
||||
|
||||
--- src/tracker-extract/tracker-extract-mp3.c.orig Fri Dec 16 16:24:23 2011
|
||||
+++ src/tracker-extract/tracker-extract-mp3.c Tue Jan 10 09:32:18 2012
|
||||
+++ src/tracker-extract/tracker-extract-mp3.c Mon Jan 30 17:36:15 2012
|
||||
@@ -1049,10 +1049,10 @@ id3v2_strlen (const gchar encoding,
|
||||
case 0x02:
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-pdf_c,v 1.5 2012/01/22 15:13:23 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-pdf_c,v 1.6 2012/02/02 07:12:23 ajacoutot Exp $
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=666654
|
||||
From a6ae1d90385b7eb9c4a5bd6a9ca17eb32b666b04 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
Date: Tue, 10 Jan 2012 11:45:29 +0000
|
||||
Subject: libtracker-common: Add new function tracker_file_open_fd()
|
||||
|
||||
--- src/tracker-extract/tracker-extract-pdf.c.orig Fri Dec 16 16:24:23 2011
|
||||
+++ src/tracker-extract/tracker-extract-pdf.c Tue Jan 10 09:20:16 2012
|
||||
+++ src/tracker-extract/tracker-extract-pdf.c Mon Jan 30 17:34:23 2012
|
||||
@@ -311,10 +311,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info
|
||||
file = tracker_extract_info_get_file (info);
|
||||
filename = g_file_get_path (file);
|
||||
|
@ -1,9 +1,12 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-text_c,v 1.6 2012/01/22 15:13:23 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-text_c,v 1.7 2012/02/02 07:12:23 ajacoutot Exp $
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=666654
|
||||
From a6ae1d90385b7eb9c4a5bd6a9ca17eb32b666b04 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
Date: Tue, 10 Jan 2012 11:45:29 +0000
|
||||
Subject: libtracker-common: Add new function tracker_file_open_fd()
|
||||
|
||||
--- src/tracker-extract/tracker-extract-text.c.orig Fri Dec 16 16:37:39 2011
|
||||
+++ src/tracker-extract/tracker-extract-text.c Tue Jan 10 09:20:33 2012
|
||||
+++ src/tracker-extract/tracker-extract-text.c Mon Jan 30 17:34:23 2012
|
||||
@@ -58,10 +58,7 @@ get_file_content (GFile *file,
|
||||
/* Get filename from URI */
|
||||
path = g_file_get_path (file);
|
||||
|
@ -1,9 +1,12 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-tiff_c,v 1.4 2012/01/22 15:13:23 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-tiff_c,v 1.5 2012/02/02 07:12:23 ajacoutot Exp $
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=666654
|
||||
From a6ae1d90385b7eb9c4a5bd6a9ca17eb32b666b04 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
Date: Tue, 10 Jan 2012 11:45:29 +0000
|
||||
Subject: libtracker-common: Add new function tracker_file_open_fd()
|
||||
|
||||
--- src/tracker-extract/tracker-extract-tiff.c.orig Fri Dec 16 16:24:23 2011
|
||||
+++ src/tracker-extract/tracker-extract-tiff.c Tue Jan 10 09:19:37 2012
|
||||
+++ src/tracker-extract/tracker-extract-tiff.c Mon Jan 30 17:34:23 2012
|
||||
@@ -291,10 +291,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info
|
||||
metadata = tracker_extract_info_get_metadata_builder (info);
|
||||
graph = tracker_extract_info_get_graph (info);
|
||||
|
@ -1,9 +1,12 @@
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-xmp_c,v 1.4 2012/01/22 15:13:23 ajacoutot Exp $
|
||||
$OpenBSD: patch-src_tracker-extract_tracker-extract-xmp_c,v 1.5 2012/02/02 07:12:23 ajacoutot Exp $
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=666654
|
||||
From a6ae1d90385b7eb9c4a5bd6a9ca17eb32b666b04 Mon Sep 17 00:00:00 2001
|
||||
From: Antoine Jacoutot <ajacoutot@openbsd.org>
|
||||
Date: Tue, 10 Jan 2012 11:45:29 +0000
|
||||
Subject: libtracker-common: Add new function tracker_file_open_fd()
|
||||
|
||||
--- src/tracker-extract/tracker-extract-xmp.c.orig Fri Dec 16 16:24:23 2011
|
||||
+++ src/tracker-extract/tracker-extract-xmp.c Tue Jan 10 09:19:59 2012
|
||||
+++ src/tracker-extract/tracker-extract-xmp.c Mon Jan 30 17:34:23 2012
|
||||
@@ -154,10 +154,7 @@ tracker_extract_get_metadata (TrackerExtractInfo *info
|
||||
preupdate = tracker_extract_info_get_preupdate_builder (info);
|
||||
metadata = tracker_extract_info_get_metadata_builder (info);
|
||||
|
Loading…
Reference in New Issue
Block a user