Re: The overloading of show (was Re: [PATCH] Output unmodified Content-Type header...
[notmuch-archives.git] / bc / c268c3fc04455ddfe3700a18d5860f515eb6d9
1 Return-Path: <tomi.ollila@nixu.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id F065D429E21\r
6         for <notmuch@notmuchmail.org>; Mon, 21 Nov 2011 07:55:22 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id y6-xAz8TuIud for <notmuch@notmuchmail.org>;\r
16         Mon, 21 Nov 2011 07:55:22 -0800 (PST)\r
17 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
18         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 44EB4431FD0\r
21         for <notmuch@notmuchmail.org>; Mon, 21 Nov 2011 07:55:22 -0800 (PST)\r
22 Received: from taco2.nixu.fi (taco2.nixu.fi [194.197.118.31])\r
23         by taco2.nixu.fi (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id\r
24         pALFtKUi001161\r
25         for <notmuch@notmuchmail.org>; Mon, 21 Nov 2011 17:55:20 +0200\r
26 From: Tomi Ollila <tomi.ollila@iki.fi>\r
27 To: <notmuch@notmuchmail.org>\r
28 Subject: [PATCH] make release: verify-version-*: change comparison logic\r
29 User-Agent: Notmuch/0.10~rc1+16~gc832dad (http://notmuchmail.org) Emacs/23.3.1\r
30         (i686-pc-linux-gnu)\r
31 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
32         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
33         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
34 Date: Mon, 21 Nov 2011 17:55:20 +0200\r
35 Message-ID: <yf6bos58o7r.fsf@taco2.nixu.fi>\r
36 MIME-Version: 1.0\r
37 Content-Type: text/plain; charset=us-ascii\r
38 X-BeenThere: notmuch@notmuchmail.org\r
39 X-Mailman-Version: 2.1.13\r
40 Precedence: list\r
41 List-Id: "Use and development of the notmuch mail system."\r
42         <notmuch.notmuchmail.org>\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
46 List-Post: <mailto:notmuch@notmuchmail.org>\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
49         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
50 X-List-Received-Date: Mon, 21 Nov 2011 15:55:23 -0000\r
51 \r
52 verfy-version-debian, verify-version-python and verify-version-components\r
53 checked noneqality of the comparison strings and if got "positive"\r
54 answer then made that goal fail. But in case of the test ([ ])\r
55 execution failed it never got to the 'then' part of the line (and\r
56 the 'if [ ... ] then ... fi ' construct doesn't make the script line\r
57 fail in case of problems inside [ ].\r
58 This commit inverses the "logic", so that only if the comparison for\r
59 equality succeeds the script line will exit with 0 and execution\r
60 can continue past the failure case to the next line (executed by another\r
61 shell) with '@echo done'\r
62 ---\r
63  Makefile.local |   15 ++++++---------\r
64  1 files changed, 6 insertions(+), 9 deletions(-)\r
65 \r
66 diff --git a/Makefile.local b/Makefile.local\r
67 index 775f393..b6e216a 100644\r
68 --- a/Makefile.local\r
69 +++ b/Makefile.local\r
70 @@ -207,28 +207,25 @@ endif\r
71  .PHONY: verify-version-debian\r
72  verify-version-debian: verify-version-components\r
73         @echo -n "Checking that Debian package version is $(VERSION)-1..."\r
74 -       @if [ "$(VERSION)-1" != $$(dpkg-parsechangelog | grep ^Version | awk '{print $$2}') ] ; then \\r
75 +       @[ "$(VERSION)-1" = $$(dpkg-parsechangelog | grep ^Version | awk '{print $$2}') ] || \\r
76                 (echo "No." && \\r
77 -                echo "Please edit version and debian/changelog to have consistent versions." && false) \\r
78 -        fi\r
79 +                echo "Please edit version and debian/changelog to have consistent versions." && false)\r
80         @echo "Good."\r
81  \r
82  .PHONY: verify-version-python\r
83  verify-version-python: verify-version-components\r
84         @echo -n "Checking that python bindings version is $(VERSION)..."\r
85 -       @if [ "$(VERSION)" != $$(python -c "execfile('$(PV_FILE)'); print __VERSION__") ] ; then \\r
86 +       @[ "$(VERSION)" = $$(python -c "execfile('$(PV_FILE)'); print __VERSION__") ] || \\r
87                 (echo "No." && \\r
88 -                echo "Please edit version and $(PV_FILE) to have consistent versions." && false) \\r
89 -        fi\r
90 +                echo "Please edit version and $(PV_FILE) to have consistent versions." && false)\r
91         @echo "Good."\r
92  \r
93  .PHONY: verify-version-components\r
94  verify-version-components:\r
95         @echo -n "Checking that $(VERSION) consists only of digits and periods..."\r
96 -       @if echo $(VERSION) | grep -q -v -x '[0-9.]*'; then \\r
97 +       @echo $(VERSION) | grep -q -x '^[0-9.]*$$' || \\r
98                 (echo "No." && \\r
99 -                echo "Please follow the instructions in RELEASING to choose a version" && false) \\r
100 -        else :; fi\r
101 +                echo "Please follow the instructions in RELEASING to choose a version" && false)\r
102         @echo "Good."\r
103  \r
104  .PHONY: verify-newer\r
105 -- \r
106 1.7.7.3\r
107 \r