bug-automake
[Top][All Lists]
Advanced

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

bug#40699: "dist Hook" documentation in manual is incorrect or unclear a


From: Vincent Lefevre
Subject: bug#40699: "dist Hook" documentation in manual is incorrect or unclear about write permissions
Date: Sun, 19 Apr 2020 00:02:09 +0200
User-agent: Mutt/1.12.1+33 (6a74e24e) vl-117499 (2019-06-23)

On 2020-04-18 15:04:08 -0600, Karl Berry wrote:
> Hi Vincent,
> 
>     So, if the subdirectories may not be writable, how can the rm in the
>     first example work without changing the permissions first?
> 
>     [namely:]
>     dist-hook:
>             rm -rf `find $(distdir)/doc -type d -name .svn`
> 
> That example belongs to the preceding paragraph 
>   (Occasionally it is useful to be able to change the distribution ...)
> not the following paragraph that you quoted.

I know, but the paragraph that follows shows an issue with this
example.

> Also, not that I wrote any of this, but it seems to me that the
> pervasive assumption is that the automake user in fact owns the file
> trees in question. Thus rm -rf should work even if it's mode zero.

No, it doesn't. At least not with

  rm (GNU coreutils) 8.30

i.e. it does not change the permissions in order to make the removal
work recursively (the -f just means that it ignores nonexistent files
and that it will never prompt for confirmation).

> Of course it won't work on a read-only source tree, but, well, it's just
> an example ... --thanks, karl.

It's just an example, but it should be correct (at least if there are
no warnings about things that have been dropped to make it simpler).
A user may want to copy-paste this example, and he will get something
incorrect.

-- 
Vincent Lefèvre <address@hidden> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)





reply via email to

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