Git development
 help / color / mirror / Atom feed
From: David Kastrup <dak@gnu.org>
To: git@vger.kernel.org
Subject: Re: [PATCH] Documentation/Makefile: remove cmd-list.made before redirecting to it.
Date: Tue, 07 Aug 2007 12:29:23 +0200	[thread overview]
Message-ID: <868x8n8wos.fsf@lola.quinscape.zz> (raw)
In-Reply-To: <7vlkcn97ll.fsf@assigned-by-dhcp.cox.net> (Junio C. Hamano's message of "Mon\, 06 Aug 2007 23\:33\:42 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> 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

      reply	other threads:[~2007-08-07 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-06 13:05 [PATCH] Documentation/Makefile: remove cmd-list.made before redirecting to it David Kastrup
2007-08-07  6:33 ` Junio C Hamano
2007-08-07 10:29   ` David Kastrup [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=868x8n8wos.fsf@lola.quinscape.zz \
    --to=dak@gnu.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox