From: David Bremner Date: Sun, 26 Jun 2016 15:29:45 +0000 (+0200) Subject: [PATCH 3/3] lib: add built_with handling for XAPIAN_DB_RETRY_LOCK X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=950906f2770fce8f9939315ae8fbc6d5ff4929da;p=notmuch-archives.git [PATCH 3/3] lib: add built_with handling for XAPIAN_DB_RETRY_LOCK --- diff --git a/44/f751961c949dd34079f50341bf514c1b71d7f3 b/44/f751961c949dd34079f50341bf514c1b71d7f3 new file mode 100644 index 000000000..9bacf3eeb --- /dev/null +++ b/44/f751961c949dd34079f50341bf514c1b71d7f3 @@ -0,0 +1,112 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 03A5E6DE01C2 + for ; Sun, 26 Jun 2016 08:30:06 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.005 +X-Spam-Level: +X-Spam-Status: No, score=-0.005 tagged_above=-999 required=5 + tests=[AWL=-0.006, HEADER_FROM_DIFFERENT_DOMAINS=0.001] + 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 QxQUH5QIif0v for ; + Sun, 26 Jun 2016 08:29:58 -0700 (PDT) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id D119C6DE028C + for ; Sun, 26 Jun 2016 08:29:57 -0700 (PDT) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1bHC0B-00022p-VP; Sun, 26 Jun 2016 11:29:39 -0400 +Received: (nullmailer pid 26563 invoked by uid 1000); + Sun, 26 Jun 2016 15:29:48 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 3/3] lib: add built_with handling for XAPIAN_DB_RETRY_LOCK +Date: Sun, 26 Jun 2016 17:29:45 +0200 +Message-Id: <1466954985-25761-4-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.8.1 +In-Reply-To: <1466954985-25761-1-git-send-email-david@tethera.net> +References: <1466954985-25761-1-git-send-email-david@tethera.net> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Sun, 26 Jun 2016 15:30:06 -0000 + +This support will be present only if the appropriate version of xapian +is available _and_ the user did not disable the feature when +building. So there really needs to be some way for the user to check. +--- + lib/built-with.c | 2 ++ + notmuch-config.c | 3 +++ + test/T030-config.sh | 1 + + test/T040-setup.sh | 3 ++- + 4 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/lib/built-with.c b/lib/built-with.c +index 635ed3b..2f1f0b5 100644 +--- a/lib/built-with.c ++++ b/lib/built-with.c +@@ -28,6 +28,8 @@ notmuch_built_with (const char *name) + return HAVE_XAPIAN_COMPACT; + } else if (STRNCMP_LITERAL (name, "field_processor") == 0) { + return HAVE_XAPIAN_FIELD_PROCESSOR; ++ } else if (STRNCMP_LITERAL (name, "retry_lock") == 0) { ++ return HAVE_XAPIAN_DB_RETRY_LOCK; + } else { + return FALSE; + } +diff --git a/notmuch-config.c b/notmuch-config.c +index de9a8a4..e5d42a0 100644 +--- a/notmuch-config.c ++++ b/notmuch-config.c +@@ -911,6 +911,9 @@ _notmuch_config_list_built_with () + printf("%sfield_processor=%s\n", + BUILT_WITH_PREFIX, + notmuch_built_with ("field_processor") ? "true" : "false"); ++ printf("%sretry_lock=%s\n", ++ BUILT_WITH_PREFIX, ++ notmuch_built_with ("retry_lock") ? "true" : "false"); + } + + static int +diff --git a/test/T030-config.sh b/test/T030-config.sh +index b8d5a86..0915abd 100755 +--- a/test/T030-config.sh ++++ b/test/T030-config.sh +@@ -59,6 +59,7 @@ foo.string=this is another string value + foo.list=this;is another;list value; + built_with.compact=something + built_with.field_processor=something ++built_with.retry_lock=something + EOF + test_expect_equal_file EXPECTED OUTPUT + +diff --git a/test/T040-setup.sh b/test/T040-setup.sh +index be2f0db..021f2d0 100755 +--- a/test/T040-setup.sh ++++ b/test/T040-setup.sh +@@ -31,6 +31,7 @@ search.exclude_tags=baz; + maildir.synchronize_flags=true + crypto.gpg_path=gpg + built_with.compact=something +-built_with.field_processor=something" ++built_with.field_processor=something ++built_with.retry_lock=something" + + test_done +-- +2.8.1 +