[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [FYI] {master} maint: assume 'test -x' is portable
From: |
Eric Blake |
Subject: |
Re: [FYI] {master} maint: assume 'test -x' is portable |
Date: |
Thu, 23 Feb 2012 16:45:15 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120209 Thunderbird/10.0.1 |
On 02/23/2012 04:39 PM, Stefano Lattarini wrote:
>> Using the M4sh language of autoconf already has _AS_DETECT_BETTER_SHELL;
>> we've used it for sanity probes in the past, and doing a sanity probe
>> for a working 'test -x' and 'rm -f' now would be reasonable.
>>
> Still, this is not 100% correct, as, e.g., a probe on 'rm' does not truly
> pertain to a macro that, judging from its name, should check the features
> of the shell.
It would be checking the features of the 'shell scripting environment',
not just the shell. But you are right - choosing a different shell
won't fix a broken rm, so the best we can do is:
>> For 'test -x', that's usually a shell builtin; so we can require it of
>> the shell. For 'rm -f', that's a separate executable, so I'm leaning
>> more towards a probe, and see what feedback we get, while still using
>> the workarounds for now.
>>
> Sounds good to me... but what is the "rm -f" workaround you are referring
> to exactly? (and sorry if this is a dumb question).
Instead of 'rm -f $list', you have to use 'test -n "$list" || rm -f $list'.
>> We still have to set as_test_x for libtool; but I'm thinking we should
>> go one step further, and rewrite AS_TEST_X to just blindly call 'test
>> -x' rather than '$as_test_x', if we go with the minimum shell requirement.
>>
> That's fine by me; I just took the "path of least modification" out of
> laziness :-) Do you want me to tweak and re-submit my patch, or will
> you take care of it?
I'll take it from here, if you'd like, since I've done probes before, so
I know where to edit.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
Re: [FYI] {master} maint: assume 'test -x' is portable, Paul Eggert, 2012/02/23
Re: [FYI] {master} maint: assume 'test -x' is portable, Peter Rosin, 2012/02/26