From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from re-prd-fep-041.btinternet.com (mailomta1-re.btinternet.com [213.120.69.94]) by sourceware.org (Postfix) with ESMTPS id 5A27B3857356 for ; Wed, 13 Apr 2022 17:58:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5A27B3857356 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk Received: from re-prd-rgout-004.btmx-prd.synchronoss.net ([10.2.54.7]) by re-prd-fep-041.btinternet.com with ESMTP id <20220413175839.JNZC3283.re-prd-fep-041.btinternet.com@re-prd-rgout-004.btmx-prd.synchronoss.net>; Wed, 13 Apr 2022 18:58:39 +0100 Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com; bimi=skipped X-SNCR-Rigid: 613A901C1E1BA491 X-Originating-IP: [86.139.167.41] X-OWM-Source-IP: 86.139.167.41 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvvddrudeluddgledvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeffkeeigfdujeehteduiefgjeeltdelgeelteekudetfedtffefhfeufefgueettdenucfkphepkeeirddufeelrdduieejrdegudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddthegnpdhinhgvthepkeeirddufeelrdduieejrdeguddpmhgrihhlfhhrohhmpehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhnsggprhgtphhtthhopedvpdhrtghpthhtoheprggurghmseguihhnfihoohguihgvrdhorhhgpdhrtghpthhtoheptgihghifihhnqdgrphhpshestgihghifihhnrdgtohhm X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.105] (86.139.167.41) by re-prd-rgout-004.btmx-prd.synchronoss.net (5.8.716.04) (authenticated as jonturney@btinternet.com) id 613A901C1E1BA491; Wed, 13 Apr 2022 18:58:38 +0100 Message-ID: Date: Wed, 13 Apr 2022 18:58:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH cygport v3] autotools.cygclass: correctly detect Autoconf 2.70+ Content-Language: en-GB To: "cygwin-apps@cygwin.com" , Adam Dinwoodie References: <20220314210539.inhr45iiryiqkcqd@lucy.dinwoodie.org> <20220314221516.13101-1-adam@dinwoodie.org> From: Jon Turney In-Reply-To: <20220314221516.13101-1-adam@dinwoodie.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1193.8 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2022 17:58:41 -0000 On 14/03/2022 22:15, Adam Dinwoodie wrote: > The latest version of Autoconf is 2.71, but the version detection > incorrectly considers 2.70 and higher as being the same as 2.59 and > lower for the purposes of specifying documentation directories. Correct > that, and make the version detection a bit more future-proof by parsing > out the actual version parts and performing numeric comparison. > > While we're at it, add a bit more commentary explaining the intent of > the different behaviour over the different Autoconf versions. I applied this. But it seems no good deed goes unpunished... > configure="${confdir}/configure" > - confver=$(grep -m 1 'GNU Autoconf' ${configure} | cut -d ' ' -f 6) > + confver="$("$configure" --version | sed -rn 's/.*GNU Autoconf ([0-9\.]+)/\1/p')" > + confver_maj=${confver%%.*} > + confver_min=${confver##*.} > + if [ $confver_maj -ne 2 ] > + then > + error "unexpected autoconf version"; > + fi When rebuilding 'dialog' to update the SRC_URI, I get: > /usr/share/cygport/cygclass/autotools.cygclass: line 658: [: -ne: unary operator expected > /usr/share/cygport/cygclass/autotools.cygclass: line 689: [: -ge: unary operator expected > /usr/share/cygport/cygclass/autotools.cygclass: line 703: [: -ge: unary operator expected It seems that the configure script for that it customized somehow and doesn't output anything matching that regex: > $ ./configure --version > > Copyright 2003-2020,2021 Thomas E. Dickey > Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 > Free Software Foundation, Inc. > This configure script is free software; the Free Software Foundation > gives unlimited permission to copy, distribute and modify it. I think that if $confver is empty, that should be an error, and then perhaps there needs to be a variable which can be set to override autodection of the ./configure script version (e.g. something like 'CONF_VERSION=2.60')