diff mbox

[fixincludes] Ignore .DS_Store junk files when running make check

Message ID CAMfHzOtQ17ETU5HOChjPwfaPYbE1yPw2ADnEBS61WxbXPpTjVg@mail.gmail.com
State New
Headers show

Commit Message

Eric Gallager July 5, 2015, 4:24 a.m. UTC
I've attached trivial, 1-line patch to fixincludes_check.tpl; it
allows 'make check' to succeed on OS X, by ignoring the files that
Finder creates to keep track of the status of directories.

-Eric Gallager
fixincludes/check.tpl | 1 +
 1 file changed, 1 insertion(+)

Comments

Andreas Schwab July 5, 2015, 7:44 a.m. UTC | #1
Eric Gallager <egall@gwmail.gwu.edu> writes:

> I've attached trivial, 1-line patch to fixincludes_check.tpl; it
> allows 'make check' to succeed on OS X, by ignoring the files that
> Finder creates to keep track of the status of directories.
>
> -Eric Gallager
>  fixincludes/check.tpl | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/fixincludes/check.tpl b/fixincludes/check.tpl
> index 0d1f444..300aeac 100644
> --- a/fixincludes/check.tpl
> +++ b/fixincludes/check.tpl
> @@ -143,6 +143,7 @@ cd $TESTBASE
>  
>  find * -type f -print | \
>  fgrep -v 'CVS/' | \
> +fgrep -v '.DS_Store' | \
>  fgrep -v '.svn/' > ${TESTDIR}/LIST
>  
>  exitok=`

find ... ! -name .DS_Store ...

Andreas.
Eric Gallager July 5, 2015, 10:58 p.m. UTC | #2
I was just matching the code that was already used there... should the
lines to ignore the CVS and .svn folders be re-written into the style
you propose, too?

On 7/5/15, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Eric Gallager <egall@gwmail.gwu.edu> writes:
>
>> I've attached trivial, 1-line patch to fixincludes_check.tpl; it
>> allows 'make check' to succeed on OS X, by ignoring the files that
>> Finder creates to keep track of the status of directories.
>>
>> -Eric Gallager
>>  fixincludes/check.tpl | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/fixincludes/check.tpl b/fixincludes/check.tpl
>> index 0d1f444..300aeac 100644
>> --- a/fixincludes/check.tpl
>> +++ b/fixincludes/check.tpl
>> @@ -143,6 +143,7 @@ cd $TESTBASE
>>
>>  find * -type f -print | \
>>  fgrep -v 'CVS/' | \
>> +fgrep -v '.DS_Store' | \
>>  fgrep -v '.svn/' > ${TESTDIR}/LIST
>>
>>  exitok=`
>
> find ... ! -name .DS_Store ...
>
> Andreas.
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
>
Andreas Schwab July 6, 2015, 5 p.m. UTC | #3
Eric Gallager <egall@gwmail.gwu.edu> writes:

> I was just matching the code that was already used there... should the
> lines to ignore the CVS and .svn folders be re-written into the style
> you propose, too?

Yes, that would be an improvement.

Andreas.
Jeff Law July 6, 2015, 7:40 p.m. UTC | #4
On 07/05/2015 04:58 PM, Eric Gallager wrote:
> I was just matching the code that was already used there... should the
> lines to ignore the CVS and .svn folders be re-written into the style
> you propose, too?
Might as well have a consistent style.  Embedding them into the "find" 
ought to be marginally faster than a pipeline of fgrep processes.

jeff
Eric Gallager July 27, 2015, 10:16 p.m. UTC | #5
On 7/6/15, Jeff Law <law@redhat.com> wrote:
> On 07/05/2015 04:58 PM, Eric Gallager wrote:
>> I was just matching the code that was already used there... should the
>> lines to ignore the CVS and .svn folders be re-written into the style
>> you propose, too?
> Might as well have a consistent style.  Embedding them into the "find"
> ought to be marginally faster than a pipeline of fgrep processes.
>
> jeff
>

Okay, I tried embedding "! -name CVS/ ! -name .svn/" into the find
command, too, but
that just led to warnings such as:
find: warning: Unix filenames usually don't contain slashes (though
pathnames do).  That means that '-name `CVS/'' will probably evaluate
to false all the time on this system.  You might find the '-wholename'
test more useful, or perhaps '-samefile'.  Alternatively, if you are
using GNU grep, you could use 'find ... -print0 | grep -FzZ `CVS/''.
find: warning: Unix filenames usually don't contain slashes (though
pathnames do).  That means that '-name `.svn/'' will probably evaluate
to false all the time on this system.  You might find the '-wholename'
test more useful, or perhaps '-samefile'.  Alternatively, if you are
using GNU grep, you could use 'find ... -print0 | grep -FzZ `.svn/''.

I'm not really sure which of these alternatives to go with... cc-ing
the fixincludes maintainer to see which he wants to go with...
Andreas Schwab July 27, 2015, 10:53 p.m. UTC | #6
Eric Gallager <egall@gwmail.gwu.edu> writes:

> Okay, I tried embedding "! -name CVS/ ! -name .svn/" into the find

-name does an exact match, so you don't need the slash.

Andreas.
diff mbox

Patch

diff --git a/fixincludes/check.tpl b/fixincludes/check.tpl
index 0d1f444..300aeac 100644
--- a/fixincludes/check.tpl
+++ b/fixincludes/check.tpl
@@ -143,6 +143,7 @@  cd $TESTBASE
 
 find * -type f -print | \
 fgrep -v 'CVS/' | \
+fgrep -v '.DS_Store' | \
 fgrep -v '.svn/' > ${TESTDIR}/LIST
 
 exitok=`