1 Return-Path: <david@tethera.net>
\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 arlo.cworth.org (Postfix) with ESMTP id C65746DE01BE
\r
6 for <notmuch@notmuchmail.org>; Thu, 9 Jun 2016 13:26:32 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.011 tagged_above=-999 required=5
\r
12 tests=[AWL=-0.000, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01]
\r
14 Received: from arlo.cworth.org ([127.0.0.1])
\r
15 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id vjhxMg6j79vw for <notmuch@notmuchmail.org>;
\r
17 Thu, 9 Jun 2016 13:26:25 -0700 (PDT)
\r
18 Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])
\r
19 by arlo.cworth.org (Postfix) with ESMTPS id C31476DE0130
\r
20 for <notmuch@notmuchmail.org>; Thu, 9 Jun 2016 13:26:24 -0700 (PDT)
\r
21 Received: from remotemail by fethera.tethera.net with local (Exim 4.84)
\r
22 (envelope-from <david@tethera.net>)
\r
23 id 1bB6Wo-0007E3-30; Thu, 09 Jun 2016 16:26:10 -0400
\r
24 Received: (nullmailer pid 14395 invoked by uid 1000);
\r
25 Thu, 09 Jun 2016 20:26:19 -0000
\r
26 From: David Bremner <david@tethera.net>
\r
27 To: notmuch@notmuchmail.org
\r
28 Subject: [Lars Luthman] Bug#826881: Calls to notmuch_directory_get_mtime()
\r
29 don't return the recently set mtime
\r
30 User-Agent: Notmuch/0.22+28~gb9bf3f4 (http://notmuchmail.org) Emacs/24.5.1
\r
31 (x86_64-pc-linux-gnu)
\r
32 Date: Thu, 09 Jun 2016 17:26:19 -0300
\r
33 Message-ID: <87k2hyxg5w.fsf@tesseract.cs.unb.ca>
\r
35 Content-Type: message/rfc822
\r
36 Content-Disposition: inline
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.20
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Thu, 09 Jun 2016 20:26:32 -0000
\r
51 Return-path: <bounces+20160609-bremner=debian.org@tracker.debian.org>
\r
52 Envelope-to: david@tethera.net
\r
53 Delivery-date: Thu, 09 Jun 2016 14:09:01 -0400
\r
54 Received: from mailly.debian.org ([2001:41b8:202:deb:6564:a62:52c3:4b72])
\r
55 by fethera.tethera.net with esmtp (Exim 4.84)
\r
56 (envelope-from <bounces+20160609-bremner=debian.org@tracker.debian.org>)
\r
58 for david@tethera.net; Thu, 09 Jun 2016 14:09:01 -0400
\r
59 Received: from ticharich.debian.org ([2001:41c8:1000:21::21:23]) from
\r
60 C=NA,ST=NA,L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP
\r
61 CA,CN=ticharich.debian.org,EMAIL=hostmaster@ticharich.debian.org (verified)
\r
62 by mailly.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
\r
63 (Exim 4.84_2) (envelope-from
\r
64 <bounces+20160609-bremner=debian.org@tracker.debian.org>) id 1bB4OG-000552-BP
\r
65 for david@tethera.net; Thu, 09 Jun 2016 18:09:12 +0000
\r
66 Received: from localhost ([::1] helo=ticharich.debian.org)
\r
67 by ticharich.debian.org with esmtp (Exim 4.84_2)
\r
68 (envelope-from <bounces+20160609-bremner=debian.org@tracker.debian.org>)
\r
70 for david@tethera.net; Thu, 09 Jun 2016 18:09:11 +0000
\r
71 Received: from muffat.debian.org ([2607:f8f0:610:4000:6564:a62:ce0c:1392])
\r
72 from C=NA,ST=NA,L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP
\r
73 CA,CN=muffat.debian.org,EMAIL=hostmaster@muffat.debian.org (verified) by
\r
74 ticharich.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
\r
75 (Exim 4.84_2) (envelope-from <debbugs@buxtehude.debian.org>) id
\r
76 1bB4OF-0005ab-Kx for dispatch+notmuch@tracker.debian.org; Thu, 09 Jun 2016
\r
78 Received: from quantz.debian.org ([2001:41c8:1000:21::21:28]) from
\r
79 C=NA,ST=NA,L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP
\r
80 CA,CN=quantz.debian.org,EMAIL=hostmaster@quantz.debian.org (verified) by
\r
81 muffat.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim
\r
82 4.84_2) (envelope-from <debbugs@buxtehude.debian.org>) id 1bB4OE-00048R-23
\r
83 for dispatch+notmuch@tracker.debian.org; Thu, 09 Jun 2016 18:09:10 +0000
\r
84 Received: from qa by quantz.debian.org with local (Exim 4.84_2)
\r
85 (envelope-from <debbugs@buxtehude.debian.org>)
\r
87 for dispatch+notmuch@tracker.debian.org; Thu, 09 Jun 2016 18:09:08 +0000
\r
88 Received: from buxtehude.debian.org ([2607:f8f0:610:4000:2015:12:0:147]) from
\r
89 C=NA,ST=NA,L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP
\r
90 CA,CN=buxtehude.debian.org,EMAIL=hostmaster@buxtehude.debian.org (verified)
\r
91 by quantz.debian.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
\r
92 (Exim 4.84_2) (envelope-from <debbugs@buxtehude.debian.org>) id
\r
93 1bB4OC-00087X-9W for notmuch@packages.qa.debian.org; Thu, 09 Jun 2016
\r
95 Received: from debbugs by buxtehude.debian.org with local (Exim 4.84_2)
\r
96 (envelope-from <debbugs@buxtehude.debian.org>)
\r
97 id 1bB4OA-0004eS-Ld; Thu, 09 Jun 2016 18:09:06 +0000
\r
98 X-Loop: owner@bugs.debian.org
\r
99 Subject: Bug#826881: Calls to notmuch_directory_get_mtime() don't return the
\r
101 Reply-To: Lars Luthman <deb-bugs@larsluthman.net>, 826881@bugs.debian.org
\r
102 Resent-From: Lars Luthman <deb-bugs@larsluthman.net>
\r
103 Resent-To: debian-bugs-dist@lists.debian.org
\r
104 Resent-CC: Carl Worth <cworth@debian.org>
\r
105 X-Loop: owner@bugs.debian.org
\r
106 Resent-Date: Thu, 09 Jun 2016 18:09:02 +0000
\r
107 Resent-Message-ID: <handler.826881.B.146549559117416@bugs.debian.org>
\r
108 X-Debian-PR-Message: report 826881
\r
109 X-Debian-PR-Package: libnotmuch-dev
\r
110 X-Debian-PR-Keywords: patch
\r
111 X-Debian-PR-Source: notmuch
\r
112 Received: via spool by submit@bugs.debian.org id=B.146549559117416
\r
113 (code B); Thu, 09 Jun 2016 18:09:02 +0000
\r
114 Received: (at submit) by bugs.debian.org; 9 Jun 2016 18:06:31 +0000
\r
115 X-Spam-Checker-Version: SpamAssassin 3.4.0-bugs.debian.org_2005_01_02
\r
116 (2014-02-07) on buxtehude.debian.org
\r
118 X-Spam-Status: No, score=-7.2 required=4.0 tests=BAYES_00,FOURLA,HAS_PACKAGE,
\r
119 MURPHY_DRUGS_REL8,NO_DNS_FOR_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,
\r
120 RCVD_IN_MSPIKE_WL,SPF_PASS,URIBL_CNKR autolearn=ham autolearn_force=no
\r
121 version=3.4.0-bugs.debian.org_2005_01_02
\r
122 X-Spam-Bayes: score:0.0000 Tokens: new, 22; hammy, 150; neutral, 64; spammy,
\r
123 0. spammytokens: hammytokens:0.000-+--systemd, 0.000-+--H*x:3.12.9-1,
\r
124 0.000-+--H*UA:3.12.9-1, 0.000-+--en_GButf8, 0.000-+--en_gb.utf8
\r
125 Received: from v-smtpgw2.han.skanova.net ([81.236.60.205])
\r
126 by buxtehude.debian.org with esmtp (Exim 4.84_2)
\r
127 (envelope-from <deb-bugs@larsluthman.net>)
\r
128 id 1bB4Le-0004WV-VR
\r
129 for submit@bugs.debian.org; Thu, 09 Jun 2016 18:06:31 +0000
\r
130 Received: from miskatonic.local ([78.69.244.232])
\r
131 by cmsmtp with SMTP
\r
132 id B4LWbP4U0ctqUB4LWb67E7; Thu, 09 Jun 2016 20:06:22 +0200
\r
133 Message-ID: <1465495580.10511.8.camel@larsluthman.net>
\r
134 From: Lars Luthman <deb-bugs@larsluthman.net>
\r
135 To: submit <submit@bugs.debian.org>
\r
136 Date: Thu, 09 Jun 2016 20:06:20 +0200
\r
137 X-Mailer: Evolution 3.12.9-1+b1
\r
138 X-CMAE-Envelope: MS4wfJIgoFnyqltd8L7/VPWXklBfV8Avcn6YiEBeVMgWKl/sx7ZZxTodvcElNPw5U47QSvDj/rHXtoZxCjfBaZMtghhxPaMqRhP3Md6vu7zCZr5p58KZgYgX
\r
139 rtbPk3salVbeqN6a+oxlsRu0Epo2Q395HiHAv8lV8WdPmfAMx7yMqumzp3Oz6R9b8OLYlU7/hiaXtw==
\r
140 Delivered-To: submit@bugs.debian.org
\r
141 Delivered-To: notmuch@packages.qa.debian.org
\r
142 Delivered-To: dispatch+notmuch@tracker.debian.org
\r
143 X-Loop: dispatch@tracker.debian.org
\r
144 X-Distro-Tracker-Package: notmuch
\r
145 X-Distro-Tracker-Keyword: bts
\r
146 List-Id: <notmuch.tracker.debian.org>
\r
147 X-Debian-Package: notmuch
\r
148 X-Debian: tracker.debian.org
\r
149 X-PTS-Package: notmuch
\r
153 <mailto:control@tracker.debian.org?body=unsubscribe%20notmuch>
\r
155 Content-Type: multipart/mixed; boundary="==-=-="
\r
158 Content-Type: text/plain; charset=utf-8
\r
159 Content-Disposition: inline
\r
161 Package: libnotmuch-dev
\r
166 notmuch_directory_set_mtime() sets the new mtime in the database, but
\r
167 doesn't update the cached value in the notmuch_directory_t object, which
\r
168 is what notmuch_directory_get_mtime() returns. This means that this
\r
171 notmuch_directory_set_mtime(dir, 12345);
\r
172 assert(notmuch_directory_get_mtime(dir) == 12345);
\r
174 will fail, which can be very confusing - I was writing unit tests for a
\r
175 library wrapper and it took a while to figure out what was going on.
\r
177 Destroying the directory object and creating a new one will cause
\r
178 notmuch_directory_get_mtime() to return the correct value.
\r
180 If this is the intended behaviour it should probably be documented. If
\r
181 it's not, the attached patch should fix it.
\r
183 -- System Information:
\r
184 Debian Release: 8.5
\r
185 APT prefers stable-updates
\r
186 APT policy: (500, 'stable-updates'), (500, 'stable')
\r
187 Architecture: i386 (i686)
\r
189 Kernel: Linux 3.16.0-4-686-pae (SMP w/2 CPU cores)
\r
190 Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
\r
191 Shell: /bin/sh linked to /bin/dash
\r
192 Init: systemd (via /run/systemd/system)
\r
194 Versions of packages libnotmuch-dev depends on:
\r
195 ii libnotmuch3 0.18.2-1
\r
197 libnotmuch-dev recommends no packages.
\r
199 libnotmuch-dev suggests no packages.
\r
201 -- no debconf information
\r
204 Content-Type: text/x-patch; charset=utf-8; name=set_cached_mtime.diff
\r
205 Content-Disposition: attachment; filename=set_cached_mtime.diff
\r
207 diff -ru notmuch-0.18.2-old/lib/directory.cc notmuch-0.18.2/lib/directory.cc
\r
208 --- notmuch-0.18.2-old/lib/directory.cc 2016-06-09 19:45:49.870660808 +0200
\r
209 +++ notmuch-0.18.2/lib/directory.cc 2016-06-09 19:46:43.670658075 +0200
\r
210 @@ -230,6 +230,7 @@
\r
211 return NOTMUCH_STATUS_XAPIAN_EXCEPTION;
\r
214 + directory->mtime = mtime;
\r
215 return NOTMUCH_STATUS_SUCCESS;
\r
218 Only in notmuch-0.18.2/lib: directory.cc~
\r