From ecdbd3eed3658fea4ca51d29bc9606a168d76dbd Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Wed, 22 Feb 2012 10:53:12 +1900 Subject: [PATCH] Re: notmuch as a shared object aka library knigge --- f4/775d5c20e8ed22fec5e63a39b89ab180eec450 | 106 ++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 f4/775d5c20e8ed22fec5e63a39b89ab180eec450 diff --git a/f4/775d5c20e8ed22fec5e63a39b89ab180eec450 b/f4/775d5c20e8ed22fec5e63a39b89ab180eec450 new file mode 100644 index 000000000..1a7c1fdb3 --- /dev/null +++ b/f4/775d5c20e8ed22fec5e63a39b89ab180eec450 @@ -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 CB148431FAE + for ; Tue, 21 Feb 2012 07:53:15 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 EM3OegRgB4ff for ; + Tue, 21 Feb 2012 07:53:15 -0800 (PST) +Received: from dmz-mailsec-scanner-7.mit.edu (DMZ-MAILSEC-SCANNER-7.MIT.EDU + [18.7.68.36]) + by olra.theworths.org (Postfix) with ESMTP id 33E47431FB6 + for ; Tue, 21 Feb 2012 07:53:15 -0800 (PST) +X-AuditID: 12074424-b7fae6d000000906-65-4f43bdea0c4b +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + by dmz-mailsec-scanner-7.mit.edu (Symantec Messaging Gateway) with SMTP + id 35.F8.02310.AEDB34F4; Tue, 21 Feb 2012 10:53:14 -0500 (EST) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q1LFrELr017419; + Tue, 21 Feb 2012 10:53:14 -0500 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q1LFrCPg028324 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Tue, 21 Feb 2012 10:53:13 -0500 (EST) +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) + (envelope-from ) + id 1Rzs1g-0002on-Fb; Tue, 21 Feb 2012 10:53:12 -0500 +Date: Tue, 21 Feb 2012 10:53:12 -0500 +From: Austin Clements +To: Justus Winter <4winter@informatik.uni-hamburg.de> +Subject: Re: notmuch as a shared object aka library knigge +Message-ID: <20120221155312.GB30513@mit.edu> +References: <20120221002921.8534.57091@thinkbox.jade-hamburg.de> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <20120221002921.8534.57091@thinkbox.jade-hamburg.de> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IRYrdT132119nf4PpvI4vZrT+YLK7fnMns + wOQx8fxpNo9nq24xBzBFcdmkpOZklqUW6dslcGXsOqddcJarYs6lHSwNjIc5uhg5OSQETCTe + rbnMBmGLSVy4tx7I5uIQEtjHKHFm4S5WCGcDo8T0x3OYIZyTTBLf5iyGcpYwShxqPsPSxcjB + wSKgKnFhhRzIKDYBDYlt+5czgtgiAqYSGx48YAexmQWMJO7vmM4MYgsLWEnc3TEZbDWvgI7E + l9c/mUBsIQEHiVcvFzJDxAUlTs58wgLRqyVx499LJpBVzALSEsv/gX3AKeAoMfnMYbBWUQEV + iSknt7FNYBSahaR7FpLuWQjdCxiZVzHKpuRW6eYmZuYUpybrFicn5uWlFuma6+VmluilppRu + YgQHtYvKDsbmQ0qHGAU4GJV4eIs3OvsLsSaWFVfmHmKU5GBSEuWduQcoxJeUn1KZkVicEV9U + mpNafIhRgoNZSYR38QKgHG9KYmVValE+TEqag0VJnFdD652fkEB6YklqdmpqQWoRTFaGg0NJ + glcWGL1CgkWp6akVaZk5JQhpJg5OkOE8QMN/gyzmLS5IzC3OTIfIn2JUlBLn/QSSEABJZJTm + wfXCks4rRnGgV4R5eUBW8AATFlz3K6DBTECDW/47ggwuSURISTUwljzl3L3rskDiM4l3z828 + jipJlR203XLJa4bDl62pDbtDH0+5ef1juxmHQK/UqjmuzOdnJrm4rDi/zFiv12txqwXr290V + FZdcO05vePbgdpePobrg3biouI0bGLib6/JPXZou1Lbs/97d5ZvEC851W+eXB3dUOm1/bVV2 + PF2rf+t5sa4lrUV8SizFGYmGWsxFxYkA17/r6RUDAAA= +Cc: notmuch mailing list +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: Tue, 21 Feb 2012 15:53:15 -0000 + +Quoth Justus Winter on Feb 21 at 1:29 am: +> Hi fellow notmuchrs, +> +> while going through the python bindings I recently came across the +> following note in the documentation for the Database.get_directory +> function [0]: +> +> ~~~ snip ~~~ +> Warning +> +> This call needs a writable database in Database.MODE.READ_WRITE +> mode. The underlying library will exit the program if this method is +> used on a read-only database! +> ~~~ snap ~~~ + +This is a bug and should be thought of as such. INTERNAL_ERROR should +only be used for internal library inconsistencies (e.g., things that +should never ever happen) and the fact that it's leaking out here (and +easy to trigger) is simply a mistake. + +This hasn't been fixed because it derives from an interface flaw. +What should notmuch_database_get_directory do on a read-only database? +It's specified to *create* the directory document if it doesn't exist, +which is the problem. We could of course bandage this up and make it +return an error if you request a non-existent directory on a read-only +database, but that's an inconsistent interface. I think we were +hoping to tweak the interface so you can tell it whether or not you +want to create the directory, independent of the database being +read/write or read-only, but no one has gotten around to that. As +always, patches welcome! -- 2.26.2