From 50615b8a18fb3be65b9b58b52f13916bb0c63142 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 9 Mar 2012 14:08:39 +2000 Subject: [PATCH] Re: [WIP PATCH] debugging gmime-2.6 fail. --- 07/f71ba9f13bb50c597f94e5b4e7c5b6ab6f1681 | 106 ++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 07/f71ba9f13bb50c597f94e5b4e7c5b6ab6f1681 diff --git a/07/f71ba9f13bb50c597f94e5b4e7c5b6ab6f1681 b/07/f71ba9f13bb50c597f94e5b4e7c5b6ab6f1681 new file mode 100644 index 000000000..fa1dcaf8f --- /dev/null +++ b/07/f71ba9f13bb50c597f94e5b4e7c5b6ab6f1681 @@ -0,0 +1,106 @@ +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 97330431FB6 + for ; Thu, 8 Mar 2012 10:09:12 -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 2HS+lyYm4CwL for ; + Thu, 8 Mar 2012 10:09:11 -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 200C1431FAE + for ; Thu, 8 Mar 2012 10:09:11 -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 1S5hlx-0006Hv-UM; Thu, 08 Mar 2012 14:09:10 -0400 +Received: from bremner by zancas.localnet with local (Exim 4.77) + (envelope-from ) + id 1S5hlX-0002ZG-KQ; Thu, 08 Mar 2012 14:08:39 -0400 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: Re: [WIP PATCH] debugging gmime-2.6 fail. +In-Reply-To: <1331220935-6553-1-git-send-email-david@tethera.net> +References: <87wr6xmlml.fsf@zancas.localnet> + <1331220935-6553-1-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.11.1+266~g2432425 (http://notmuchmail.org) Emacs/23.3.1 + (x86_64-pc-linux-gnu) +Date: Thu, 08 Mar 2012 14:08:39 -0400 +Message-ID: <87eht3m0d4.fsf@zancas.localnet> +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="=-=-=" +X-Spam_bar: - +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 18:09:12 -0000 + +--=-=-= + +On Thu, 8 Mar 2012 11:35:35 -0400, David Bremner wrote: + + +> 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. + +That patch is of course complete nonsense. Attached is another silly +patch, which at least demonstrates the problem. With the attached patch, +notmuch (+ gmime-2.6) only fails for non-mbox messages. So I guess we +need a way to detect if a file is mbox before parsing? or a way to get +gmime to be less strict here? + + +--=-=-= +Content-Type: text/x-diff +Content-Disposition: inline; + filename=0001-WIP-debugging-gmime-2.6-problems.patch + +>From 7fb942049ae68e09ebb9fbca40048f95543ab4b8 Mon Sep 17 00:00:00 2001 +From: David Bremner +Date: Thu, 8 Mar 2012 11:11:21 -0400 +Subject: [PATCH] WIP debugging gmime-2.6 problems + +Unconditionally tell gmime to look for an mbox. This of course makes +it fail for non-mboxes. +--- + mime-node.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/mime-node.c b/mime-node.c +index a95bdab..3e07fbf 100644 +--- a/mime-node.c ++++ b/mime-node.c +@@ -111,7 +111,9 @@ mime_node_open (const void *ctx, notmuch_message_t *message, + goto DONE; + } + ++ g_mime_parser_set_scan_from(mctx->parser, TRUE); + 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; +-- +1.7.9.1 + + +--=-=-=-- -- 2.26.2