From 1a022d5d935b4cc2bb714b94799f1ea1baeacfff Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Thu, 23 Aug 2012 09:26:06 +0300 Subject: [PATCH] Re: [PATCH 1/3] Add notmuch_database_close_compact --- c8/35e7bec7db32aa2cd56d51113138c078a3a08c | 107 ++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 c8/35e7bec7db32aa2cd56d51113138c078a3a08c diff --git a/c8/35e7bec7db32aa2cd56d51113138c078a3a08c b/c8/35e7bec7db32aa2cd56d51113138c078a3a08c new file mode 100644 index 000000000..8e6c07e88 --- /dev/null +++ b/c8/35e7bec7db32aa2cd56d51113138c078a3a08c @@ -0,0 +1,107 @@ +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 15BC7431FBD + for ; Wed, 22 Aug 2012 23:26:00 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + 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 GyHEtslHUU18 for ; + Wed, 22 Aug 2012 23:25:59 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 18DF1431FAE + for ; Wed, 22 Aug 2012 23:25:59 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 82465100386; Thu, 23 Aug 2012 09:26:06 +0300 (EEST) +From: Tomi Ollila +To: Kim Minh Kaplan +Subject: Re: [PATCH 1/3] Add notmuch_database_close_compact +In-Reply-To: <87haruxiae.fsf@kaki.tech.prive.nic.fr> +References: <1345476704-17091-1-git-send-email-bgamari.foss@gmail.com> + <1345476704-17091-2-git-send-email-bgamari.foss@gmail.com> + <87y5l8z4dw.fsf@gmail.com> + + <87haruxiae.fsf@kaki.tech.prive.nic.fr> +User-Agent: Notmuch/0.14+8~gd6b499d (http://notmuchmail.org) Emacs/23.1.1 + (x86_64-redhat-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +Cc: notmuch +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: Thu, 23 Aug 2012 06:26:00 -0000 + +On Thu, Aug 23 2012, Kim Minh Kaplan wrote: + +> Tomi Ollila=C2=A0: +> +>> On Tue, Aug 21 2012, Ben Gamari wrote: +>> +>>> Eh? 1.2.6 is the first Xapian release to have Compactor exposed in the +>>> public API. +>> +>> Presuming that those variables are always numeric the comparison could b= +e: +>> +>> if [ ${xapian_major_version} -gt 1 ] ||=20 +>> [ ${xapian_major_version} -eq 1 -a ${xapian_minor_version} -gt 2 ] ||= +=20 +>> [ ${xapian_major_version} -eq 1 -a ${xapian_minor_version} -eq 2 -a \ +>> ${xapian_subminor_version} -ge 6 ]; then +>> +>> (I could not figure out anything shorter and/or cleaner) +> +> Try: +> +> case "${xapian_version}" in +> 0.*|1.[01].*|1.2.[0-5]) ;; +> *) ... ;; +> esac + +That sure is shorter -- and splitting xapian_version +is not required... + +.. also that would take care the (improbable?) case that +`${xapian_config} -- version` outputs something else than +#.#.# in the future. + +On the other hand, the above doesn't catch junk, so maybe: + + case ${xapian_version} in + 0.*|1.[01].*|1.2.[0-5]) handle no case ;;=20=20 + [1-9]*.[0-9]*.[0-9]*) handle yes case -- approximated test ;; + *) failure ;; + esac + +(and we (approximately) expect #.#.#) + +In any case, excellent idea ! + + +> Kim Minh. + +Thanks, + +Tomi -- 2.26.2