[WIP PATCH] debugging gmime-2.6 fail.
authorDavid Bremner <david@tethera.net>
Thu, 8 Mar 2012 15:35:35 +0000 (11:35 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:45:18 +0000 (09:45 -0800)
62/8666a9f0cd163b07c4f41eef5dff5e20c6fb58 [new file with mode: 0644]

diff --git a/62/8666a9f0cd163b07c4f41eef5dff5e20c6fb58 b/62/8666a9f0cd163b07c4f41eef5dff5e20c6fb58
new file mode 100644 (file)
index 0000000..276c99d
--- /dev/null
@@ -0,0 +1,91 @@
+Return-Path: <bremner@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id E9884431FB6\r
+       for <notmuch@notmuchmail.org>; Thu,  8 Mar 2012 07:36:06 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id ISDe5IVxeaax for <notmuch@notmuchmail.org>;\r
+       Thu,  8 Mar 2012 07:36:06 -0800 (PST)\r
+Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
+       (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 81CA7431FAE\r
+       for <notmuch@notmuchmail.org>; Thu,  8 Mar 2012 07:36:06 -0800 (PST)\r
+Received: from fctnnbsc30w-142166230117.dhcp-dynamic.fibreop.nb.bellaliant.net\r
+       ([142.166.230.117] helo=zancas.localnet)\r
+       by tesseract.cs.unb.ca with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32)\r
+       (Exim 4.72) (envelope-from <bremner@tethera.net>)\r
+       id 1S5fNq-00069a-Kk; Thu, 08 Mar 2012 11:36:02 -0400\r
+Received: from bremner by zancas.localnet with local (Exim 4.77)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1S5fNl-0001jy-Bj; Thu, 08 Mar 2012 11:35:57 -0400\r
+From: David Bremner <david@tethera.net>\r
+To: notmuch@notmuchmail.org\r
+Subject: [WIP PATCH] debugging gmime-2.6 fail.\r
+Date: Thu,  8 Mar 2012 11:35:35 -0400\r
+Message-Id: <1331220935-6553-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.7.9.1\r
+In-Reply-To: <87wr6xmlml.fsf@zancas.localnet>\r
+References: <87wr6xmlml.fsf@zancas.localnet>\r
+X-Spam_bar: -\r
+Cc: David Bremner <bremner@debian.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 08 Mar 2012 15:36:07 -0000\r
+\r
+From: David Bremner <bremner@debian.org>\r
+\r
+Try parsing again as mbox if the first one failed.\r
+---\r
+I ran out of time for the moment, but the following patch gets me down from \r
+4196 failures on the notmuch mailing list to 3422.\r
+\r
+I'm leaning to reverting back to gmime-2.4 for the Debian 0.12 package\r
+if I can't sort this out.\r
+\r
+ mime-node.c |    9 +++++++++\r
+ 1 files changed, 9 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/mime-node.c b/mime-node.c\r
+index a95bdab..1d3a184 100644\r
+--- a/mime-node.c\r
++++ b/mime-node.c\r
+@@ -111,8 +111,17 @@ mime_node_open (const void *ctx, notmuch_message_t *message,\r
+       goto DONE;\r
+     }\r
+ \r
++\r
+     mctx->mime_message = g_mime_parser_construct_message (mctx->parser);\r
+     if (!mctx->mime_message) {\r
++      /*\r
++       * Parsing failed, let's try again as an mbox\r
++       */\r
++      mctx->parser = g_mime_parser_new_with_stream (mctx->stream);\r
++      mctx->mime_message = g_mime_parser_construct_message (mctx->parser);\r
++    }\r
++\r
++    if (!mctx->mime_message) {\r
+       fprintf (stderr, "Failed to parse %s\n", filename);\r
+       status = NOTMUCH_STATUS_FILE_ERROR;\r
+       goto DONE;\r
+-- \r
+1.7.9.1\r
+\r