automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Testsuite: do not use `chmod -R' when cleaning up.


From: Stefano Lattarini
Subject: Re: [PATCH] Testsuite: do not use `chmod -R' when cleaning up.
Date: Wed, 7 Oct 2009 02:10:04 +0200
User-agent: KMail/1.12.0 (Linux/2.6.26-1-686; KDE/4.3.0; i686; ; )

At Tuesday 06 October 2009, Ralf Wildenhues <address@hidden> 
wrote:
> Hi Stefano,
>
> [CUT]
> Thanks for the patch and the explanations.  One question/nit:
> > --- a/tests/Makefile.am
> > +++ b/tests/Makefile.am
> > @@ -745,5 +745,9 @@ check_SCRIPTS = defs defs-p
> > aclocal-$(APIVERSION) automake-$(APIVERSION) clean-local:
> > clean-local-check
> >  .PHONY: clean-local-check
> >  clean-local-check:
> > -   -chmod -R u+rwx *.dir
> > +   -for d in *.dir; do \
> > +      if test -d "$$d"; then \
> > +        find "$$d" -type d '!' -perm -200 -exec chmod u+w {} ';';
> > \ +    else :; fi; \
> > +   done
> >     -rm -rf defs-p *.dir
>
> Any reason against using
>   -find *.dir -type d '!' -perm -200 -exec chmod u+w {} ';' 2>/dev/null
>
> or, if you care about error messages other than "find: `*.dir': No
> such file or directory", then maybe something like
>   -set x *.dir; shift; \
>    if test "$$#,$$1" != "1,*.dir"; then \
>      find "$$@" -type d '!' -perm -200 -exec chmod u+w {} ';'; \
>    else :; fi
>
> to avoid lots of forking in the "normal" case?
No reason at all.  I just thought that avoiding forks was not important
here.  I have amended and resent my patch.  I have also changed your
fix sligthly, to make it even clearer (IMHO).

Regards,
    Stefano

Attachment: 0001-Testsuite-do-not-use-chmod-R-when-cleaning-up.patch
Description: Text Data


reply via email to

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