Re: [Tracker] Releasing Tracker 0.6.90

2009-01-16 Thread Martyn Russell

On 16/01/09 06:49, Tshepang Lekhonkhobe wrote:

On Thu, Jan 15, 2009 at 1:36 PM, Martyn Russellmar...@imendio.com  wrote:

Hi Jamie,

So we have been in a state of bug fixing on Tracker trunk now for a good few
months ironing out issues we have found and preparing for a release.

We would like to make this release at the end of next week if possible.

How do you feel about this?

Would you like me to do the release or would you like to do it?

Are there any issues/questions you have before releasing?


I'm not Jamie, but how about reviewing the docs before releasing...


Which documents?

--
Regards,
Martyn
___
tracker-list mailing list
tracker-list@gnome.org
http://mail.gnome.org/mailman/listinfo/tracker-list


Re: [Tracker] Releasing Tracker 0.6.90

2009-01-16 Thread Tshepang Lekhonkhobe
On Fri, Jan 16, 2009 at 11:05 AM, Martyn Russell mar...@imendio.com wrote:
 On 16/01/09 06:49, Tshepang Lekhonkhobe wrote:

 On Thu, Jan 15, 2009 at 1:36 PM, Martyn Russellmar...@imendio.com
  wrote:

 Hi Jamie,

 So we have been in a state of bug fixing on Tracker trunk now for a good
 few
 months ironing out issues we have found and preparing for a release.

 We would like to make this release at the end of next week if possible.

 How do you feel about this?

 Would you like me to do the release or would you like to do it?

 Are there any issues/questions you have before releasing?

 I'm not Jamie, but how about reviewing the docs before releasing...

 Which documents?

README, NEWS, TODO, and manpages needs updating (Evolution work,
removable devices, and much more).


-- 
my place on the web:
floss-and-misc.blogspot.com
___
tracker-list mailing list
tracker-list@gnome.org
http://mail.gnome.org/mailman/listinfo/tracker-list


Re: [Tracker] Releasing Tracker 0.6.90

2009-01-16 Thread Martyn Russell

On 16/01/09 09:17, Tshepang Lekhonkhobe wrote:

On Fri, Jan 16, 2009 at 11:05 AM, Martyn Russellmar...@imendio.com  wrote:

On 16/01/09 06:49, Tshepang Lekhonkhobe wrote:

On Thu, Jan 15, 2009 at 1:36 PM, Martyn Russellmar...@imendio.com
  wrote:

Hi Jamie,

So we have been in a state of bug fixing on Tracker trunk now for a good
few
months ironing out issues we have found and preparing for a release.

We would like to make this release at the end of next week if possible.

How do you feel about this?

Would you like me to do the release or would you like to do it?

Are there any issues/questions you have before releasing?

I'm not Jamie, but how about reviewing the docs before releasing...

Which documents?


README, NEWS, TODO, and manpages needs updating (Evolution work,
removable devices, and much more).


We did update these a lot recently (over the past few months). But if 
you want to help by sending in patches for things missing, that would 
really help the release process and be great :)


--
Regards,
Martyn
___
tracker-list mailing list
tracker-list@gnome.org
http://mail.gnome.org/mailman/listinfo/tracker-list


Re: [Tracker] Releasing Tracker 0.6.90

2009-01-16 Thread Tshepang Lekhonkhobe
On Fri, Jan 16, 2009 at 11:45 AM, Martyn Russell mar...@imendio.com wrote:
 On 16/01/09 09:17, Tshepang Lekhonkhobe wrote:

 On Fri, Jan 16, 2009 at 11:05 AM, Martyn Russellmar...@imendio.com
  wrote:

 On 16/01/09 06:49, Tshepang Lekhonkhobe wrote:

 On Thu, Jan 15, 2009 at 1:36 PM, Martyn Russellmar...@imendio.com
  wrote:

 Hi Jamie,

 So we have been in a state of bug fixing on Tracker trunk now for a
 good
 few
 months ironing out issues we have found and preparing for a release.

 We would like to make this release at the end of next week if possible.

 How do you feel about this?

 Would you like me to do the release or would you like to do it?

 Are there any issues/questions you have before releasing?

 I'm not Jamie, but how about reviewing the docs before releasing...

 Which documents?

 README, NEWS, TODO, and manpages needs updating (Evolution work,
 removable devices, and much more).

 We did update these a lot recently (over the past few months). But if you
 want to help by sending in patches for things missing, that would really
 help the release process and be great :)

I may send patches for review 'cuz I don't understand much of what you
guys have done (EG the Turtle thang) so will then do some learning.


-- 
my place on the web:
floss-and-misc.blogspot.com
___
tracker-list mailing list
tracker-list@gnome.org
http://mail.gnome.org/mailman/listinfo/tracker-list


Re: [Tracker] Crashes with tracker-indexer

2009-01-16 Thread Carlos Garnacho
Hi Laurent!

On jue, 2009-01-15 at 22:19 +0100, Laurent Aguerreche wrote:
 Hi!
 
 I see tracker-indexer crashing at the same point but not always with the
 same files:
 
 ...
 Tracker-Message: --- [33] DBus request to check 1000 files
 Tracker-Message: --- [33] Success, no error given
 (tracker-indexer:10627): Tracker-DEBUG: Parent
 path:'/local/laguerre/FretsOnFire' exists in cache, should index
 (tracker-indexer:10627): Tracker-DEBUG: Updating item
 '/local/laguerre/FretsOnFire/pygame.mouse.so'
 (tracker-indexer:10627): Tracker-DEBUG: Parent
 path:'/local/laguerre/FretsOnFire' exists in cache, should index
 (tracker-indexer:10627): Tracker-DEBUG: Updating item
 '/local/laguerre/FretsOnFire/_random.so'
 (tracker-indexer:10627): Tracker-DEBUG: Transaction commit
 (tracker-indexer:10627): Tracker-DEBUG: Flushing index with 18 items in
 cache
 
 Program received signal SIGSEGV, Segmentation fault.
 0x77bbf78d in indexer_update_word (indez=0x7518d0,
 word=0x11e51e0 _random, new_hits=0x115c580) at tracker-db-index.c:611
 611   if (new_hit-id  previous_hits[center].id) {
 Missing separate debuginfos, use: debuginfo-install
 e2fsprogs-libs-1.41.3-2.fc10.x86_64 gamin-0.1.9-6.fc10.x86_64
 gvfs-1.0.3-4.fc10.x86_64 hal-libs-0.5.12-12.20081027git.fc10.x86_64
 keyutils-libs-1.2-3.fc9.x86_64 krb5-libs-1.6.3-16.fc10.x86_64
 libcap-2.10-2.fc10.x86_64 libcurl-7.18.2-9.fc10.x86_64
 libidn-0.6.14-8.x86_64 libselinux-2.0.73-1.fc10.x86_64
 libssh2-0.18-7.fc9.x86_64 libxslt-1.1.24-2.fc10.x86_64
 nspr-4.7.3-2.fc10.x86_64 nss-3.12.2.0-3.fc10.x86_64
 openldap-2.4.12-1.fc10.x86_64 openssl-0.9.8g-12.fc10.x86_64
 raptor-1.4.18-1.fc10.x86_64
 (gdb) bt
 #0  0x77bbf78d in indexer_update_word (indez=0x7518d0,
 word=0x11e51e0 _random, new_hits=0x115c580) at tracker-db-index.c:611
 #1  0x77bbfa4a in cache_flush_item (key=0x11e51e0,
 value=0x115c580, user_data=0x7518d0) at tracker-db-index.c:724
 #2  0x77bc00bb in tracker_db_index_flush (indez=0x6840a0) at
 tracker-db-index.c:878
 #3  0x00408f49 in flush_data (indexer=0x778820) at
 tracker-indexer.c:350
 #4  0x003af9837f5b in g_timeout_dispatch (source=0x801bc0,
 callback=0x7fffd44b, user_data=0x0) at gmain.c:3589
 #5  0x003af983779b in g_main_dispatch () at gmain.c:2144
 #6  IA__g_main_context_dispatch (context=0x6315a0) at gmain.c:2697
 #7  0x003af983af6d in g_main_context_iterate (context=0x6315a0,
 block=1, dispatch=1, self=value optimized out) at gmain.c:2778
 #8  0x003af983b49d in IA__g_main_loop_run (loop=0x799cc0) at
 gmain.c:2986
 #9  0x0040faf5 in main (argc=1, argv=0x7fffd928) at
 tracker-main.c:396
 (gdb) print center
 $1 = 2147483647
 (gdb) print right
 $2 = 4294967295
 (gdb) print left
 $3 = 0
 (gdb) print old_hit_count
 $4 = 5
 (gdb) print word
 $5 = (const gchar *) 0x11e51e0 _random
 (gdb) print tsiz
 $6 = 40
 
 
 Any ideas?

I figured out what was happening, the pivots to perform binary search
were declared as guint, however the right pivot could potentially get to
be -1 if the item isn't found, so it underflowed to G_MAXUINT. I've just
fixed it in trunk.

Thanks! :)


___
tracker-list mailing list
tracker-list@gnome.org
http://mail.gnome.org/mailman/listinfo/tracker-list


[Tracker] Migration or porting from GMime 2.2 to GMime 2.4

2009-01-16 Thread Philip Van Hoof
This patch ports the old Evolution support code to GMime 2.4

-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be
Index: src/tracker-indexer/modules/evolution-common.h
===
--- src/tracker-indexer/modules/evolution-common.h	(revision 2802)
+++ src/tracker-indexer/modules/evolution-common.h	(working copy)
@@ -55,7 +55,6 @@
 			   gint  flags,
 			   off_t start);
 TrackerModuleMetadata * evolution_common_get_wrapper_metadata (GMimeDataWrapper *wrapper);
-gchar * evolution_common_get_object_encoding  (GMimeObject  *object);
 
 G_END_DECLS
 
Index: src/tracker-indexer/modules/evolution-pop.c
===
--- src/tracker-indexer/modules/evolution-pop.c	(revision 2802)
+++ src/tracker-indexer/modules/evolution-pop.c	(working copy)
@@ -175,7 +175,7 @@
 	gchar *number;
 	gint id;
 
-	header = g_mime_message_get_header (message, X-Evolution);
+	header = g_mime_object_get_header (GMIME_OBJECT (message), X-Evolution);
 
 if (!header) {
 return -1;
@@ -253,8 +253,12 @@
 tracker_evolution_pop_file_get_text (TrackerModuleFile *file)
 {
 TrackerEvolutionPopFile *self;
-gchar *text, *encoding, *utf8_text;
-gboolean is_html;
+	const gchar *encoding;
+	gchar buffer[1024];
+	guint len;
+	GString *body;
+	GMimeStream *stream;
+	GMimeDataWrapper *data;
 
 self = TRACKER_EVOLUTION_POP_FILE (file);
 
@@ -263,27 +267,38 @@
 		return NULL;
 	}
 
-text = g_mime_message_get_body (self-message, TRUE, is_html);
+	data = g_mime_part_get_content_object (GMIME_PART (self-message));
 
-if (!text) {
-return NULL;
-}
+	if (!data)
+		return NULL;
 
-encoding = evolution_common_get_object_encoding (GMIME_OBJECT (self-message));
+	stream = g_mime_data_wrapper_get_stream (data);
 
-if (!encoding) {
-/* FIXME: could still puke on non-utf8
- * messages without proper content type
- */
-return text;
-}
+	if (!stream) {
+		g_object_unref (data);
+		return NULL;
+	}
 
-utf8_text = g_convert (text, -1, utf8, encoding, NULL, NULL, NULL);
+	body = g_string_new ();
 
-g_free (encoding);
-g_free (text);
+	encoding = g_mime_object_get_content_disposition_parameter (GMIME_OBJECT (self-message), charset);
 
-return utf8_text;
+	while (!g_mime_stream_eos (stream)) {
+		len = g_mime_stream_read (stream, buffer, 1024);
+		if (len  0  g_utf8_validate (buffer, len, NULL)) {
+			if (!encoding)
+g_string_append_len (body, buffer, (gssize) len);
+			else {
+ gchar *part_body = g_convert (buffer, (gssize) len, utf8, encoding, NULL, NULL, NULL);
+g_string_append (body, part_body);
+g_free (part_body);
+			}
+		}
+	}
+
+	g_object_unref (stream);
+
+	return g_string_free (body, FALSE);
 }
 
 static guint
@@ -291,7 +306,7 @@
 {
 	const gchar *header, *pos;
 
-	header = g_mime_message_get_header (message, X-Evolution);
+	header = g_mime_object_get_header (GMIME_OBJECT (message), X-Evolution);
 
 	if (!header) {
 		return 0;
@@ -304,34 +319,24 @@
 
 static GList *
 get_message_recipients (GMimeMessage *message,
-const gchar  *type)
+GMimeRecipientType type)
 {
 	GList *list = NULL;
-	const InternetAddressList *addresses;
+	InternetAddressList *addresses;
+	guint len, i;
 
 	addresses = g_mime_message_get_recipients (message, type);
 
-	while (addresses) {
+	len = internet_address_list_length (addresses);
+	
+	while (i  len) {
 		InternetAddress *address;
-		gchar *str;
 
-		address = addresses-address;
+		address = internet_address_list_get_address (addresses, i);
 
-		if (address-name  address-value.addr) {
-			str = g_strdup_printf (%s %s, address-name, address-value.addr);
-		} else if (address-value.addr) {
-			str = g_strdup (address-value.addr);
-		} else if (address-name) {
-			str = g_strdup (address-name);
-		} else {
-			str = NULL;
-		}
+		list = g_list_prepend (list, internet_address_to_string (address, TRUE));
 
-		if (str) {
-			list = g_list_prepend (list, str);
-		}
-
-		addresses = addresses-next;
+		i++;
 	}
 
 	return g_list_reverse (list);
@@ -427,7 +432,8 @@
 }
 
 static void
-extract_mime_parts (GMimeObject *object,
+extract_mime_parts (GMimeObject *parent, 
+GMimeObject *object,
 gpointer user_data)
 {
 	GList **list = (GList **) user_data;
@@ -440,7 +446,7 @@
 		message = g_mime_message_part_get_message (GMIME_MESSAGE_PART (object));
 
 		if (message) {
-			g_mime_message_foreach_part (message, extract_mime_parts, user_data);
+			g_mime_message_foreach (message, extract_mime_parts, user_data);
 			g_object_unref (message);
 		}
 
@@ -451,7 +457,7 @@
 

[Tracker] Plan to start targeting GMime 2.4

2009-01-16 Thread Philip Van Hoof
We plan to migrate from GMime 2.2 to GMime 2.4 right after release
0.6.90 is released.

This means distributions have one more release of Tracker that will
depend on GMime 2.2, being Tracker 0.6.90. After that there's no more
excuse for not preparing a GMime 2.4 package.

The reason why we want to migrate is that we didn't find any version of
GMime 2.2 that passed a test of parsing 10,000 E-mails without crashing.

If we find any such instabilities in GMime 2.4 then at least we can
write patches for GMime's trunk, as GMime trunk and GMime 2.4 share the
same API version, and we also think that fixing GMime 2.4 will ensure a
faster new GMime version with the fix included (in case necessary).

Note for distributors that GMime 2.4 can be make-installed alongside a
GMime 2.2. Just like glib-1.2 and glib-2.0 have GMime 2.2 and GMime 2.4
different major versioning in the .so and .pc filenames.

This is a bug for tracking progression on migrating from GMime 2.2 to
GMime 2.4. Note that the patch is already written and awaits review for
approval by Carlos Garnacho.

http://bugzilla.gnome.org/show_bug.cgi?id=564640


ps. It's possible that we'll release a Tracker 0.6.91 before the 0.7.x
series will start, to have a Tracker with a GMime 2.4 version. But this
is yet undecided. Note that the crash in GMime 2.2 is serious and 100%
reproducable for all versions of GMime 2.2 that we tried.


-- 
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://pvanhoof.be/blog
http://codeminded.be

___
tracker-list mailing list
tracker-list@gnome.org
http://mail.gnome.org/mailman/listinfo/tracker-list