From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id DA77A6DE00C4 for ; Tue, 4 Oct 2016 17:35:34 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.007 X-Spam-Level: X-Spam-Status: No, score=-0.007 tagged_above=-999 required=5 tests=[AWL=0.004, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kALKZtz4FbaJ for ; Tue, 4 Oct 2016 17:35:33 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 0AB716DE00BD for ; Tue, 4 Oct 2016 17:35:32 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1braB3-0001ca-2y; Tue, 04 Oct 2016 20:35:17 -0400 Received: (nullmailer pid 4151 invoked by uid 1000); Wed, 05 Oct 2016 00:35:26 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH] require xapian >= 1.2.6 Date: Tue, 4 Oct 2016 21:35:23 -0300 Message-Id: <20161005003523.4087-1-david@tethera.net> X-Mailer: git-send-email 2.9.3 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Wed, 05 Oct 2016 00:35:34 -0000 It seems that no-one tried to compile without Xapian compact support since March of 2015, since that's when I introduced a syntax error in that branch of the ifdef. Given the choice of maintaining this underused branch of code, or bumping the Xapian dependency to a version from 2011, it seems reasonable to do the latter. --- On the one hand I'm tempted to include this in a bugfix point release; on the other hand I recognize this is mostly wounded pride, since replacing a compiler error with a configure error telling the user to upgrade Xapian is only a small win. configure | 5 +++-- lib/database.cc | 12 ------------ 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/configure b/configure index cc6746c..2a0ce9e 100755 --- a/configure +++ b/configure @@ -394,6 +394,7 @@ EOF printf "Yes.\n" else printf "No.\n" + errors=$((errors + 1)) fi rm -f _compact.o _compact.cc @@ -683,8 +684,8 @@ EOF if [ $have_python -eq 0 ]; then echo " python interpreter" fi - if [ $have_xapian -eq 0 ]; then - echo " Xapian library (including development files such as headers)" + if [ $have_xapian -eq 0 -o $have_xapian_compact -eq 0 ]; then + echo " Xapian library (>= version 1.2.6, including development files such as headers)" echo " https://xapian.org/" fi if [ $have_zlib -eq 0 ]; then diff --git a/lib/database.cc b/lib/database.cc index 4bfae01..f0bfe56 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -1143,7 +1143,6 @@ notmuch_database_close (notmuch_database_t *notmuch) return status; } -#if HAVE_XAPIAN_COMPACT static int unlink_cb (const char *path, unused (const struct stat *sb), @@ -1327,17 +1326,6 @@ notmuch_database_compact (const char *path, return ret; } -#else -notmuch_status_t -notmuch_database_compact (unused (const char *path), - unused (const char *backup_path), - unused (notmuch_compact_status_cb_t status_cb), - unused (void *closure)) -{ - _notmuch_database_log (notmuch, "notmuch was compiled against a xapian version lacking compaction support.\n"); - return NOTMUCH_STATUS_UNSUPPORTED_OPERATION; -} -#endif notmuch_status_t notmuch_database_destroy (notmuch_database_t *notmuch) -- 2.9.3