Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / 1d / caf11cec9d98afe22e5706cd14cff0b012e3d9
1 Return-Path: <amdragon@mit.edu>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 23D91431FBD\r
6         for <notmuch@notmuchmail.org>; Fri, 27 Jun 2014 12:37:12 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id dV48znJzOCV6 for <notmuch@notmuchmail.org>;\r
16         Fri, 27 Jun 2014 12:37:06 -0700 (PDT)\r
17 Received: from dmz-mailsec-scanner-7.mit.edu (dmz-mailsec-scanner-7.mit.edu\r
18         [18.7.68.36])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 4D821431FAE\r
22         for <notmuch@notmuchmail.org>; Fri, 27 Jun 2014 12:37:06 -0700 (PDT)\r
23 X-AuditID: 12074424-f79146d00000067c-c9-53adc7e18bdc\r
24 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])\r
25         (using TLS with cipher AES256-SHA (256/256 bits))\r
26         (Client did not present a certificate)\r
27         by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP\r
28         id 02.9A.01660.1E7CDA35; Fri, 27 Jun 2014 15:37:05 -0400 (EDT)\r
29 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11])\r
30         by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id s5RJb2RE011699; \r
31         Fri, 27 Jun 2014 15:37:03 -0400\r
32 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
33         (authenticated bits=0)\r
34         (User authenticated as amdragon@ATHENA.MIT.EDU)\r
35         by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s5RJb0R1013147\r
36         (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
37         Fri, 27 Jun 2014 15:37:01 -0400\r
38 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
39         (envelope-from <amdragon@mit.edu>)\r
40         id 1X0bxD-0002cV-Qt; Fri, 27 Jun 2014 15:36:59 -0400\r
41 Date: Fri, 27 Jun 2014 15:36:59 -0400\r
42 From: Austin Clements <amdragon@MIT.EDU>\r
43 To: Jakub Wilk <jwilk@debian.org>\r
44 Subject: Re: Bug#749890: python3-notmuch: missing header in mbox message ->\r
45         NullPointerError\r
46 Message-ID: <20140627193659.GH4660@mit.edu>\r
47 References: <8738ewudra.fsf@zancas.localnet> <20140623201918.GA7346@jwilk.net>\r
48         <87ha37fjm3.fsf@zancas.localnet> <20140626213100.GA8930@jwilk.net>\r
49         <878uoifj9n.fsf@zancas.localnet>\r
50 MIME-Version: 1.0\r
51 Content-Type: text/plain; charset=us-ascii\r
52 Content-Disposition: inline\r
53 In-Reply-To: <878uoifj9n.fsf@zancas.localnet>\r
54 User-Agent: Mutt/1.5.21 (2010-09-15)\r
55 X-Brightmail-Tracker:\r
56  H4sIAAAAAAAAA+NgFlrJKsWRmVeSWpSXmKPExsUixCmqrPvw+Npgg6ZXKhZbXhVa3GjtZrT4\r
57         NP8Qu8X1mzOZHVg8LmydxOLxq20us8ezVbeYPbYces8cwBLFZZOSmpNZllqkb5fAlXH5Wztj\r
58         wRuxir0Tm5gaGJcJdTFyckgImEhM3DqJCcIWk7hwbz1bFyMXh5DAbCaJZTuvsEA4Gxkllu89\r
59         zgThnGaSuHn0HTuEs4RR4vrKHhaQfhYBVYnFm1eygdhsAhoS2/YvZwSxRQQUJY4e7GMGsZkF\r
60         4iVWznkDZgsLxEnsX9fH2sXIwcEroC3xZastxMxdjBJTH6xnB6nhFRCUODnzCQtEr5bEjX8v\r
61         mUDqmQWkJZb/4wAJcwroSrx78h5spKiAisSUk9vYJjAKzULSPQtJ9yyE7gWMzKsYZVNyq3Rz\r
62         EzNzilOTdYuTE/PyUot0zfVyM0v0UlNKNzGCwp/dRWUHY/MhpUOMAhyMSjy8np1rg4VYE8uK\r
63         K3MPMUpyMCmJ8i49AhTiS8pPqcxILM6ILyrNSS0+xCjBwawkwiu9AijHm5JYWZValA+TkuZg\r
64         URLnfWttFSwkkJ5YkpqdmlqQWgSTleHgUJLgFQLGuZBgUWp6akVaZk4JQpqJgxNkOA/QcEWQ\r
65         Gt7igsTc4sx0iPwpRmOOT9eOtTFxPJp0qo1JiCUvPy9VSpxX9BhQqQBIaUZpHtw0WAp7xSgO\r
66         9Jww7z+QKh5g+oOb9wpoFRPQKvOCVSCrShIRUlINjJ3KPw8dCpL8+/1u2nXfGfs3BRhOKuG9\r
67         KuQvX3c4QWiVzVn5C14ZrL25dx9dif6tyr6zX6zt/8Uww73cHOtOTWjr3eB02oR33Z+DXnpn\r
68         14r/+Lt8qd98/icCjXobmCQVrFXFAuxY7tsnPeBkW8l259oUxbkpJx8atuevOvhYom7TpbK0\r
69         m70OJ5RYijMSDbWYi4oTAZLnIAs8AwAA\r
70 Cc: notmuch@notmuchmail.org, 749890@bugs.debian.org\r
71 X-BeenThere: notmuch@notmuchmail.org\r
72 X-Mailman-Version: 2.1.13\r
73 Precedence: list\r
74 List-Id: "Use and development of the notmuch mail system."\r
75         <notmuch.notmuchmail.org>\r
76 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
77         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
78 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
79 List-Post: <mailto:notmuch@notmuchmail.org>\r
80 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
81 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
82         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
83 X-List-Received-Date: Fri, 27 Jun 2014 19:37:12 -0000\r
84 \r
85 Quoth David Bremner on Jun 27 at 12:45 pm:\r
86 > Jakub Wilk <jwilk@debian.org> writes:\r
87\r
88 > > * David Bremner <david@tethera.net>, 2014-06-26, 18:26:\r
89 > >>>0.18.1~rc0-1 is much better, thanks!\r
90 > >>>\r
91 > >>>I still get NullPointerError for one of my messages, though. :-( The \r
92 > >>>message is in the MBOXCL format (where message body size is indicated \r
93 > >>>by the Content-Length field), and has lines starting with "From " in \r
94 > >>>the message body. I've attached a new test case.\r
95 > >>\r
96 > >>That message (and at a guess other MBOXCL files) is ignored as a \r
97 > >>non-mail file by 0.18.1 "notmuch new".\r
98 > >\r
99 > > Indeed.\r
100 > >\r
101 > >>Is this another case of files which where indexed with an older version \r
102 > >>of notmuch causing problems with a newer version?\r
103 > >\r
104 > > Yes, that's why I meant. Sorry for not being clear.\r
105\r
106 > As a point of information, I bisected with the following test script:\r
107\r
108 > #!/usr/bin/env bash\r
109 > test_description='"notmuch new" in several variations'\r
110 > . ./test-lib.sh\r
111\r
112 > test_begin_subtest "Support single-message mbox with content length (deprecated)"\r
113 > cat > "${MAIL_DIR}"/mbox_file2 <<EOF\r
114 > From jwilk  Fri May 30 14:09:05 2014\r
115 > Subject: Hello world!\r
116 > Content-Length: 12\r
117 > Lines: 1\r
118\r
119 > From world!\r
120\r
121 > EOF\r
122 > output=$(NOTMUCH_NEW 2>&1)\r
123 > test_expect_equal "$output" \\r
124 > "Added 1 new message to the database."\r
125\r
126\r
127 > test_done\r
128\r
129 > The commit where the behaviour changed to reject MBOXCL files with \r
130 > 'From ' in the body was 610f0e09929. This was between 0.14 and 0.15.\r
131 > I'd say this was unintentional, although it isn't clear to me yet how\r
132 > easy it is fix.\r
133 \r
134 Thanks for bisecting this, David.\r
135 \r
136 Unfortunately, when it comes to mbox, the only winning move is not to\r
137 play.\r
138 \r
139 The reason 610f0e09929 matters here is because it *added* support for\r
140 mbox (or, rather, this weird but surprisingly common chimera of\r
141 mbox-formatted message files with maildir-formatted file names).\r
142 Previously, notmuch assumed *everything* was a maildir-formatted\r
143 message file; that is, one message per file.  It "worked" for mboxcl\r
144 because it had no idea what either mbox or mboxcl was.  But it would\r
145 choke hard when it encountered a large, multi-message mbox archive\r
146 because it would try to index the whole thing as one giant email.  In\r
147 an effort to avoid this, I added explicit support for single-message\r
148 mbox files (to keep the chimerians happy).  But at that point we lost:\r
149 there simply is no way to reliably and programmatically distinguish\r
150 the many variants of mbox (see\r
151 http://www.jwz.org/doc/content-length.html for a good discussion of\r
152 this).\r
153 \r
154 So, I'm afraid my best advice is to convert your mboxcl files to\r
155 something else.  Probably maildir, both because you're storing them in\r
156 a maildir (I assume?) and because it's easy: just strip off the first\r
157 line.  I don't think there's anything notmuch can do to fix this\r
158 without breaking something else.\r