git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Documentation/Makefile: remove cmd-list.made before redirecting to it.

From
David Kastrup <dak@gnu.org>
Date
Aug 7, 2007, 10:29 UTC
Message-ID
<868x8n8wos.fsf@lola.quinscape.zz>
In-Reply-To
<7vlkcn97ll.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
> Although I understand that it would be a problem if you built as
> root earlier, which would have left files unmodifyable by you, I
> think this is getting out of hand.  The cmd-list.perl script itself,
> for example, does "creat in $out+, if the contents have changed from
> the last round then rename $out+ to $out" sequence in order to avoid
> unnecessary rebuild of files that depend on the generated command
> list.  If it is interrupted in the middle while running as root, and
> then you try to do another build, I suspect "creat in $out+" part
> would fail.

No, creat is only interested in the directory permissions. It is open(..., O_TRUNC) that causes the problem. There are not many programs that actually use that for their output files, but shell output redirection is one of them, and some editors tend to do this as well in order to easily preserve permissions.

There are no other shell output redirections to an undeleted file in the Makefile.

-- 
David Kastrup
Previous: Junio C Hamano
Message 3 of 3 in “Documentation/Makefile: remove cmd-list.made before redirecting to it.”
  1. Documentation/Makefile: remove cmd-list.made before redirecting to it.David Kastrup, Aug 6, 2007
  2. Junio C HamanoAug 7, 2007
  3. David KastrupAug 7, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.