bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bootstrap $buildreq and implicit dependencies


From: Eric Blake
Subject: Re: bootstrap $buildreq and implicit dependencies
Date: Wed, 07 Dec 2011 14:50:15 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

[re-adding the list]

On 12/07/2011 02:36 PM, Pádraig Brady wrote:
> On 12/07/2011 08:52 PM, Eric Blake wrote:
>> +if test ! -d "$local_gl_dir" \
>> +    || find "$local_gl_dir" -name '*.diff' -exec false {} +; then
>> +  :
>> +else
> 
> A small nit.
> 
> I'm slightly wary with this first use of "find ... {} +" in gnulib.
> This would be more portable and clearer I think:
> 
> if find "$local_gl_dir" -name '*.diff' 2>/dev/null | grep . >/dev/null; then

While it is true that POSIX 'find -exec blah {} +' isn't widely
supported yet, the only drawback of using it here is that if you are on
a system with ancient find, then find will (probably noisily) fail with
a syntax error, and the surrounding if/else will then require 'patch' as
an unconditional dependency, which isn't that bad.  Most non-GNU/Linux
development systems already have patch, while the particular problem
that prompted this was a default Fedora install, where Fedora doesn't
install patch by default but does have a POSIX-compliant find.

Right now, I'm only 30% in favor of making this tweak, unless others can
speak up with more reasons why we must cater to older find.  Any other
opinions?

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]