Re: [PATCH 1/1] devel/release-checks.sh: adjust to LIBNOTMUCH version checks
authorJani Nikula <jani@nikula.org>
Wed, 4 Dec 2013 18:39:25 +0000 (19:39 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:58:37 +0000 (09:58 -0800)
ae/0eac367fefe34f6e7c8e109ab9f13125390f6d [new file with mode: 0644]

diff --git a/ae/0eac367fefe34f6e7c8e109ab9f13125390f6d b/ae/0eac367fefe34f6e7c8e109ab9f13125390f6d
new file mode 100644 (file)
index 0000000..d08d98b
--- /dev/null
@@ -0,0 +1,159 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 1411D431FD2\r
+       for <notmuch@notmuchmail.org>; Wed,  4 Dec 2013 10:39:52 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id QU2q3O6QhnFT for <notmuch@notmuchmail.org>;\r
+       Wed,  4 Dec 2013 10:39:44 -0800 (PST)\r
+Received: from mail-qa0-f53.google.com (mail-qa0-f53.google.com\r
+       [209.85.216.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 798F0431FD0\r
+       for <notmuch@notmuchmail.org>; Wed,  4 Dec 2013 10:39:44 -0800 (PST)\r
+Received: by mail-qa0-f53.google.com with SMTP id j5so6947871qaq.12\r
+       for <notmuch@notmuchmail.org>; Wed, 04 Dec 2013 10:39:44 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=1e100.net; s=20130820;\r
+       h=x-gm-message-state:from:to:cc:subject:in-reply-to:references\r
+       :user-agent:date:message-id:mime-version:content-type;\r
+       bh=cAc4Hwp1HkVMBMJEogjsBbWkItI990nhTOEZ3/HKWnQ=;\r
+       b=R8KtKpRRT8v00ol0o32R6bLcVtM8Yq8SH5qt9zq5zUOSUqHeg7USNgflRkoHcM6CTy\r
+       wHScEHkfB3Bqd05XSjm8UM+ZSIStioga4pWMwmDy5eQiWOaRiykuJz+8Zu6ydfHrMVEj\r
+       sV6ljBNyl89x8MWcarivnFHMBMBC9WS7TV+GJqPi/I2IW/iG7NJ6OLKS/BCwYysoS/zK\r
+       R13Hmb/dsPQrZYif3I5GIkXZu5pE/gIseH5Kd7TtnJMf3krs0FuEWJF0hED2PqJTddRd\r
+       6TnoWKkqzDMU1kz5o6qcLvOnD6i0EykCl6rk1AZCvD2CaAUtl5TxuxUnUF7Klhld7OFl\r
+       36Eg==\r
+X-Gm-Message-State:\r
+ ALoCoQlO5OEpZz5fusdEdOvckAlTAs+Y2zpc8axnJS8FPW4g0CKcu5vdGVixzVwNC+Zre29XmirV\r
+X-Received: by 10.224.56.5 with SMTP id w5mr138542104qag.60.1386182383928;\r
+       Wed, 04 Dec 2013 10:39:43 -0800 (PST)\r
+Received: from localhost ([2001:4b98:dc0:43:216:3eff:fe1b:25f3])\r
+       by mx.google.com with ESMTPSA id o5sm20182005qeg.2.2013.12.04.10.39.43\r
+       for <multiple recipients>\r
+       (version=TLSv1.1 cipher=RC4-SHA bits=128/128);\r
+       Wed, 04 Dec 2013 10:39:43 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Tomi Ollila <tomi.ollila@iki.fi>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 1/1] devel/release-checks.sh: adjust to LIBNOTMUCH version\r
+       checks\r
+In-Reply-To: <1386178739-17475-1-git-send-email-tomi.ollila@iki.fi>\r
+References: <1386173986-9624-1-git-send-email-amdragon@mit.edu>\r
+       <1386178739-17475-1-git-send-email-tomi.ollila@iki.fi>\r
+User-Agent: Notmuch/0.17~rc2+4~gd7b0a0a (http://notmuchmail.org) Emacs/23.2.1\r
+       (x86_64-pc-linux-gnu)\r
+Date: Wed, 04 Dec 2013 19:39:25 +0100\r
+Message-ID: <87r49ssboi.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Cc: tomi.ollila@iki.fi\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://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: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 04 Dec 2013 18:39:52 -0000\r
+\r
+On Wed, 04 Dec 2013, Tomi Ollila <tomi.ollila@iki.fi> wrote:\r
+> NOTMUCH_VERSION_* macros in lib/notmuch.h are replaced with\r
+> LIBNOTMUCH_VERSION_* macros. Check that the values of those\r
+> match the LIBNOTMUCH_*_VERSION values in lib/Makefile.local.\r
+> ---\r
+>  devel/release-checks.sh | 41 ++++++++++++++++++++---------------------\r
+>  1 file changed, 20 insertions(+), 21 deletions(-)\r
+>\r
+> diff --git a/devel/release-checks.sh b/devel/release-checks.sh\r
+> index d6410ad..7be57df 100755\r
+> --- a/devel/release-checks.sh\r
+> +++ b/devel/release-checks.sh\r
+> @@ -77,37 +77,36 @@ case $VERSION in\r
+>      *)      verfail "'$VERSION' is a single number" ;;\r
+>  esac\r
+>  \r
+> -_set_version_components ()\r
+> -{\r
+> -    VERSION_MAJOR=$1\r
+> -    VERSION_MINOR=$2\r
+> -    VERSION_MICRO=${3:-0} # set to 0 in case $3 is unset or "null" (string)\r
+> -}\r
+> +echo -n "Checking that LIBNOTMUCH version macros & variables match ... "\r
+> +# lib/notmuch.h\r
+> +LIBNOTMUCH_MAJOR_VERSION=broken\r
+> +LIBNOTMUCH_MINOR_VERSION=broken\r
+> +LIBNOTMUCH_MICRO_VERSION=broken\r
+> +# lib/Makefile.local\r
+> +LIBNOTMUCH_VERSION_MAJOR=broken\r
+> +LIBNOTMUCH_VERSION_MINOR=broken\r
+> +LIBNOTMUCH_VERSION_RELEASE=broken\r
+\r
+Does the test pass if both values are "broken"? Should the other set be\r
+borken? Am I being too pessimistic? :)\r
+\r
+At a glance, the patch looks good, but admittedly didn't spend too much\r
+time on it.\r
+\r
+BR,\r
+Jani.\r
+\r
+\r
+> +\r
+> +eval `awk 'NF == 3 && $1 == "#define" && $2 ~ /^LIBNOTMUCH_[A-Z]+_VERSION$/ \\r
+> +    && $3 ~ /^[0-9]+$/ { print $2 "=" $3 }' lib/notmuch.h`\r
+>  \r
+> -IFS=.\r
+> -_set_version_components $VERSION\r
+> -IFS=$DEFAULT_IFS\r
+> +eval `awk 'NF == 3 && $1 ~ /^LIBNOTMUCH_VERSION_[A-Z]+$/ && $2 == "=" \\r
+> +    && $3 ~ /^[0-9]+$/ { print $1 "=" $3 }' lib/Makefile.local`\r
+>  \r
+> -echo -n "Checking that libnotmuch version macros match $VERSION... "\r
+> -NOTMUCH_MAJOR_VERSION=broken\r
+> -NOTMUCH_MINOR_VERSION=broken\r
+> -NOTMUCH_MICRO_VERSION=broken\r
+> -eval `awk 'NF == 3 && $1 == "#define" && $2 ~ /^NOTMUCH_[A-Z]+_VERSION$/ \\r
+> -    && $3 ~ /^[0-9]+$/ { print $2 "=" $3 }' lib/notmuch.h`\r
+>  \r
+>  check_version_component ()\r
+>  {\r
+> -    eval local v1=\$VERSION_$1\r
+> -    eval local v2=\$NOTMUCH_$1_VERSION\r
+> +    eval local v1=\$LIBNOTMUCH_$1_VERSION\r
+> +    eval local v2=\$LIBNOTMUCH_VERSION_$2\r
+>      if [ $v1 != $v2 ]\r
+> -    then    append_emsg "NOTMUCH_$1_VERSION is defined as '$v2' in lib/notmuch.h instead of '$v1'"\r
+> +    then    append_emsg "LIBNOTMUCH_$1_VERSION ($v1) does not equal LIBNOTMUCH_VERSION_$2 ($v2)"\r
+>      fi\r
+>  }\r
+>  \r
+>  old_emsg_count=$emsg_count\r
+> -check_version_component MAJOR\r
+> -check_version_component MINOR\r
+> -check_version_component MICRO\r
+> +check_version_component MAJOR MAJOR\r
+> +check_version_component MINOR MINOR\r
+> +check_version_component MICRO RELEASE\r
+>  [ $old_emsg_count = $emsg_count ] && echo Yes. || echo No.\r
+>  \r
+>  echo -n "Checking that this is Debian package for notmuch... "\r
+> -- \r
+> 1.8.0\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r