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