[Top][All Lists]

[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 19:39:07 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0

On 12/07/2011 06:44 PM, Paul Eggert wrote:
> On 12/07/11 13:50, Eric Blake wrote:
>> unless others can speak up with more reasons why we must cater to older find.
> How about if we do this instead?
>   find "$local_gl_dir" -name '*.diff' -exec false {} + -exec false ';'

Oh my - that is indeed a hack!  Alas, it won't work.  With old find, it
parses as this, for each file.diff found:

false file.diff + -exec false

but -exec ... \; is required to _not_ affect exit status (rather, it
affects whether the expression itself is true or false, moving on to
remaining expressions in the command line).  And to prove it, on Solaris 10:

$ /usr/bin/find gnulib/ -name ChangeLog -print -exec false {} \;
$ echo $?

The only way to get a difference in exit status is with -exec ... +
(there, -exec is required to always be true and move on to the next
expression, which is why it must affect exit status); but since that
pre-supposes new find, you are stuck with another construct such as find
| grep to check for output.

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]