[PATCH 3/3] lib: add built_with handling for XAPIAN_DB_RETRY_LOCK
authorDavid Bremner <david@tethera.net>
Sun, 26 Jun 2016 15:29:45 +0000 (17:29 +0200)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:22:07 +0000 (16:22 -0700)
44/f751961c949dd34079f50341bf514c1b71d7f3 [new file with mode: 0644]

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