Please review: JDK-8011348 "use of which in common/autoconf/autogen.sh is not portable"
tim.bell at oracle.com
Thu Apr 4 05:51:18 UTC 2013
On 04/03/13 19:14, David Katleman wrote:
> On 4/2/2013 7:42 PM, Tim Bell wrote:
>> All -
>> I regret the fact that I did not test the fix for 8009988 (see below)
>> when I reviewed it. The script as written there assumes that the
>> 'which' utility will return nothing if the command is not found. On
>> some platforms (Solaris and Windows/Cygwin to name two), the return
>> is more like 'no autoconf-2.67 in $PATH'
>> Please review the fix for 8011348, which restores autogen.sh to
>> platform independence.
>> 46 AUTOCONF=$(which autoconf 2> /dev/null);
>> 47 if test $? -ne 0; then
>> 48 unset AUTOCONF
>> 49 fi
> The above still won't work on older Solaris releases, most S10 and
> As both success and failure will result in $? being 0, if means
> AUTOCONF will be set to either
> no autoconf in AAA BBB CCC
> I would borrow what we just came up with for hgforest.sh:
> AUTOCONF="`which autoconf 2> /dev/null | grep -v '^no autoconf in'`"
> You don't need the trailing test check then.
Thanks Dave - This is much better. Several of us got a few lessons in
the perils of using /usr/bin/which on Solaris systems today.
Revised webrev is here:
>> The bug report should be visible soon at:
>> Webrev is here:
>> Thanks in advance for any reviews. Feedback welcome-
>> -------- Original Message --------
>> Subject: hg: jdk8/build: 8009988: build-infra: Fix configure
>> output for zip debuginfo check
>> Date: Tue, 02 Apr 2013 12:59:43 +0000
>> From: ahughes at redhat.com
>> To: jdk8-changes at openjdk.java.net, build-dev at openjdk.java.net
>> Changeset: 15c1642967c9
>> Author: andrew
>> Date: 2013-04-02 13:59 +0100
>> URL: http://hg.openjdk.java.net/jdk8/build/rev/15c1642967c9
>> 8009988: build-infra: Fix configure output for zip debuginfo check
>> Summary: No output from zip debuginfo option when default is used.
>> Reviewed-by: tbell
>> ! common/autoconf/autogen.sh
>> ! common/autoconf/generated-configure.sh
>> ! common/autoconf/jdk-options.m4
More information about the build-dev