From 272f6a35afb202526b29a549748185c1f153939b Mon Sep 17 00:00:00 2001 From: Michal Nazarewicz Date: Mon, 3 Sep 2012 17:36:11 +0200 Subject: [PATCH] Re: [PATCH V2 1/2] devel: add release-checks.sh --- b9/70ff5c64d64ba2415f399d2b557072d2cfef05 | 192 ++++++++++++++++++++++ 1 file changed, 192 insertions(+) create mode 100644 b9/70ff5c64d64ba2415f399d2b557072d2cfef05 diff --git a/b9/70ff5c64d64ba2415f399d2b557072d2cfef05 b/b9/70ff5c64d64ba2415f399d2b557072d2cfef05 new file mode 100644 index 000000000..cc44fd862 --- /dev/null +++ b/b9/70ff5c64d64ba2415f399d2b557072d2cfef05 @@ -0,0 +1,192 @@ +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 4A5B7431FB6 + for ; Mon, 3 Sep 2012 08:36:23 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7] + 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 4XG4eWRjZ6cb for ; + Mon, 3 Sep 2012 08:36:22 -0700 (PDT) +Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com + [74.125.83.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + 02D7E431FAF for ; Mon, 3 Sep 2012 08:36:21 -0700 + (PDT) +Received: by eekb47 with SMTP id b47so2346482eek.26 + for ; Mon, 03 Sep 2012 08:36:19 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; + s=20120113; h=sender:from:to:subject:in-reply-to:organization:references + :user-agent:x-face:face:x-pgp:x-pgp-fp:date:message-id:mime-version + :content-type; bh=u/k3i18RAV1KI9kS84iqGTaXO9KIxfONtaTiwj+h7to=; + b=GPreNjW6g5qgjL3/k8Z7lCBSWNP/ky/rxHZdzFRFFz0MJcVlz22hbhgsoI6F1JXfC2 + oa5kIr9yOOqfq55ACAdJjxdF6gbr+bwUPpqnJfMYskRD46N2y5/C4dqv0YhW1Qxph2Xv + bFOj509AF2A3Tj6aLpyinQEiVHVHEzMofObBuv/URDTKhsJPh9i/7inEqbtvL/7swrSr + MRg9b9NncSlpXOINh3zvFqjWZag/sQL5ZMzxiDZMHQGgTpEFFV+NHlSHenyVY9SGXgCj + +ulnBl+tzgm8DuED9624y0NqzpWL+I+xtgFEvUIE4AQxBEzcSpAbdoEdYHY1dISC65DX ZPFQ== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=sender:from:to:subject:in-reply-to:organization:references + :user-agent:x-face:face:x-pgp:x-pgp-fp:date:message-id:mime-version + :content-type:x-gm-message-state; + bh=u/k3i18RAV1KI9kS84iqGTaXO9KIxfONtaTiwj+h7to=; + b=SW1fJqPH3IRCmei69F76hczfgoL8PLeDeKiaOACY/2wkeBFCM0u9Z4cED+hYTqARw6 + /xzKn32tZA+oUjXs+sEl9ZMQVgLviLz2M0Jm+XwPv/DgumxmPTGfT+bookjOrdnUC89Z + kK5juRen1E+F2QXV4lAeOFJnq4MBu2JwkSy7hIq1aA37FForEnaNDxAE2Mue2HN6Ppqs + 0N/59buOzHauRG1sb4zER/hkFG1PGEn5cU0lIYdHxXjYQW3ZE6uRUD6nuTennzh7oLzs + oXnks92wPoxHeR6HN95RzLquaKZxF9N5gHy8izaD1E+QxlgtIr1e+5d5przlpu7mPMzQ + cyPg== +Received: by 10.14.4.201 with SMTP id 49mr22331554eej.0.1346686579375; + Mon, 03 Sep 2012 08:36:19 -0700 (PDT) +Received: by 10.14.4.201 with SMTP id 49mr22331541eej.0.1346686579203; + Mon, 03 Sep 2012 08:36:19 -0700 (PDT) +Received: from mpn-glaptop ([2620:0:105f:5:f2de:f1ff:fe35:1a72]) + by mx.google.com with ESMTPS id e7sm37527584eep.2.2012.09.03.08.36.17 + (version=TLSv1/SSLv3 cipher=OTHER); + Mon, 03 Sep 2012 08:36:18 -0700 (PDT) +Sender: Michal Nazarewicz +From: Michal Nazarewicz +To: Tomi Ollila , notmuch@notmuchmail.org +Subject: Re: [PATCH V2 1/2] devel: add release-checks.sh +In-Reply-To: +Organization: http://mina86.com/ +References: <1346491928-2356-1-git-send-email-tomi.ollila@iki.fi> + +User-Agent: Notmuch/0.14+2~g416b120 (http://notmuchmail.org) Emacs/24.2.50.1 + (x86_64-unknown-linux-gnu) +X-Face: PbkBB1w#)bOqd`iCe"Ds{e+!C7`pkC9a|f)Qo^BMQvy\q5x3?vDQJeN(DS?|-^$uMti[3D*#^_Ts"pU$jBQLq~Ud6iNwAw_r_o_4]|JO?]}P_}Nc&"p#D(ZgUb4uCNPe7~a[DbPG0T~!&c.y$Ur,=N4RT>]dNpd; KFrfMCylc}gc??'U2j,!8%xdD +Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWbfGlUPDDHgE57V0jUupKjgIObY0PLrom9mH4dFRK4gmjPs41MxjOgAAACQElEQVQ4jW3TMWvbQBQHcBk1xE6WyALX1069oZBMlq+ouUwpEQQ6uRjttkWP4CmBgGM0BQLBdPFZYPsyFUo6uEtKDQ7oy/U96XR2Ux8ehH/89Z6enqxBcS7Lg81jmSuujrfCZcLI/TYYvbGj+jbgFpHJ/bqQAUISj8iLyu4LuFHJTosxsucO4jSDNE0Hq3hwK/ceQ5sx97b8LcUDsILfk+ovHkOIsMbBfg43VuQ5Ln9YAGCkUdKJoXR9EclFBhixy3EGVz1K6eEkhxCAkeMMnqoAhAKwhoUJkDrCqvbecaYINlFKSRS1i12VKH1XpUd4qxL876EkMcDvHj3s5RBajHHMlA5iK32e0C7VgG0RlzFPvoYHZLRmAC0BmNcBruhkE0KsMsbEc62ZwUJDxWUdMsMhVqovoT96i/DnX/ASvz/6hbCabELLk/6FF/8PNpPCGqcZTGFcBhhAaZZDbQPaAB3+KrWWy2XgbYDNIinkdWAFcCpraDE/knwe5DBqGmgzESl1p2E4MWAz0VUPgYYzmfWb9yS4vCvgsxJriNTHoIBz5YteBvg+VGISQWUqhMiByPIPpygeDBE6elD973xWwKkEiHZAHKjhuPsFnBuArrzxtakRcISv+XMIPl4aGBUJm8Emk7qBYU8IlgNEIpiJhk/No24jHwkKTFHDWfPniR4iw5vJaw2nzSjfq2zffcE/GDjRC2dn0J0XwPAbDL84TvaFCJEU4Oml9pRyEUhR3Cl2t01AoEjRbs0sYugp14/4X5n4pU4EHHnMAAAAAElFTkSuQmCC +X-PGP: 50751FF4 +X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4 +Date: Mon, 03 Sep 2012 17:36:11 +0200 +Message-ID: +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="=-=-=" +X-Gm-Message-State: ALoCoQn4zRJWSWCPibn/7y8u9mjZHKmBtE7FiZi99rDmU9HHFU12qNF5YBA8fGf8WSsv7q5VTtkwRti4mZIFG29VyjkiYZFgYT5GYRObUttOSgKa5Ch4I9YkRhBjvpZlVJveD1GDyRJlLMi9pw26zYChzlPmsxDJco/P638KHsiARjqKJ9DU3dK6VuRj/Jjv4wDoiDWWPozyL08vwgquAvUpVs1GUPQ2lg== +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: Mon, 03 Sep 2012 15:36:23 -0000 + +--=-=-= +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable + +>> Tomi Ollila writes: +>>> +for f in ./version debian/changelog NEWS "$PV_FILE" +>>> +do +>>> + test -f $f || { append_emsg "File '$f' is missing"; continue; } +>>> + test -r $f || { append_emsg "File '$f' is unreadable"; continue; } +>>> + test -s $f || append_emsg "File '$f' is empty" + +> On Mon, Sep 03 2012, Michal Nazarewicz wrote: +>> if ! [ -f "$f" ]; then +>> append_emsg "File '$f' is missing" +>> elif ! [ -r "$f" ]; then +>> append_emsg "File '$f' is unreadable" +>> elif ! [ -s "$f" ]; then +>> append_emsg "File '$f' is empty" +>> fi + +Tomi Ollila writes: +> IMHO this short-circuited or (||) version works well due to this +> negation handling. The $f's should have been quoted ("$f"), though +> (in case some of the items contain whitespace the construct=20 +> would't fail). I am open to other opinions, though. + +I personally don't like =E2=80=9C||=E2=80=9D or =E2=80=9C&&=E2=80=9D as a r= +eplacement for if as I find +it less readable. Especially here as you use braces and =E2=80=9Ccontinue= +=E2=80=9D. + +>> if [ x"$deb_notmuch" =3D xnotmuch ] +>> +>> And so in the rest of the conditions below. +> +> builtin bash '[' seems to be robust in these cases(*) ... but I'm now bre= +aking +> my own rule about not using most portable expressions; maybe it is just +> ugliness of the format in so many places. I'm not changing unless there is +> more desire for it :) + +It's not even bash. Newest POSIX requires that behaviour, but I always +use x anyway myself, hence the comment. + +>>> + set x $* + +>> Uh? Did you mean =E2=80=9Cset -- $*=E2=80=9D? + +> Nope, set in some shells don't know '--' (now I'm following the most +> portable code snippet principle) so with 'x' and just referencing +> positional parameters with number one larger than with '--' does the +> trick. + +Interesting. I must start doing that. :) + +>>> + manthdata `sed -n '/^[.]TH NOTMUCH/ { y/"/ /; p; }' "$mp"` + +>> Alternatively =E2=80=9C\.=E2=80=9D instead of =E2=80=9C[.]=E2=80=9D. + +> I prefer [.] as a more robust alternative -- backslashes may get=20 +> "expanded away" in some cases; using [.] just frees me from checking +> whether that may happen. + +I guess it's a valid point. + +> Thanks for the review, I'll probably send new version tomorrow... + +Sure thing. + +--=20 +Best regards, _ _ +.o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o +..o | Computer Science, Micha=C5=82 =E2=80=9Cmina86=E2=80=9D Nazarewicz = + (o o) +ooo +------------------ooO--(_)--Ooo-- +--=-=-= +Content-Type: multipart/signed; boundary="==-=-="; + micalg=pgp-sha1; protocol="application/pgp-signature" + +--==-=-= +Content-Type: text/plain + + +--==-=-= +Content-Type: application/pgp-signature + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.10 (GNU/Linux) + +iQIcBAEBAgAGBQJQRM5rAAoJECBgQBJQdR/0G5sP/33VxTcHYq9fevuWAuVy7CKk +RYaBegyKYo76qtdC8UV9RRl2vRAUn5NVeyvrD68O1y/UX2vfQ7DT7Oh1FkkOccrt +s9ZUBWpGmuIGlJeO9uIs33ZjQGFLrk9v1c1lTC6wMHY5gkyVa/WRyDXT2jTKwfwH +BMGHw0yafqUlFYVsI+y0rl9bP4EN9s37mtMzmqval4JGE6KSBeJMERG83Zq3MmxA +YiB/kTViBVbf/j+t1asV+8Y82spE4KH+ErXuguyzKCEX+72hZxBaqhzgxfU2+MOe +XZIGa30uFAtL9i1yy6QwWqSu4ajsxouHRAEuEmGPAAlncj7mdtNpwLjjTP9GmgwX +4vSnicgRFUEscNENvhihuoJf/NE6nmtZ0D2l0+8FTCxVkVF+nN4cDqEHrwvxITpG +vYGp1Kt6ga4wdzAezJqhph7+tzKX143RPK2NaB20184ZMjo7xd6sGfT7OH7Nprl+ +zFaJfr0ku9HD42Jvl6sPLCET2MWZYelQJjw+UDysu2pS9fImq2Z0VmJ/g9jV8WM6 +oqXKZ5cBXu00qcISGBbQl77vjEbQwGaB6LlwQOfEn+xGvE9w8UH1KU0dAtDA79Hn +AM0eL28BqC5HrokWpkUUogOGSDEQGblzZjMPEratuTPKKi9ZZ0RqWO6htWRnJLxd +a85JSyFasyvIn1jHMzfb +=bon6 +-----END PGP SIGNATURE----- +--==-=-=-- + +--=-=-=-- -- 2.26.2