From: ludo@gnu.org (Ludovic Courtès)
To: David Michael <fedora.dm0@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH shepherd] support: Ignore errors on parent directories in mkdir-p.
Date: Sat, 06 Feb 2016 14:14:48 +0100 [thread overview]
Message-ID: <87si16yo8n.fsf@gnu.org> (raw)
In-Reply-To: <CAEvUa7=ZX-PBBiHm0JZxJszNzhjVaAiL6jYdEtTUsFONYSS7Bg@mail.gmail.com> (David Michael's message of "Fri, 5 Feb 2016 13:22:48 -0500")
David Michael <fedora.dm0@gmail.com> skribis:
> On Thu, Feb 4, 2016 at 11:47 AM, Ludovic Courtès <ludo@gnu.org> wrote:
[...]
>> I think that it’s a case where it would be beneficial for the Hurd to
>> follow what Linux does, which is to return EEXIST.
>>
>> How does Coreutils’ ‘mkdir -p’ behave in this situation? (I’ve looked
>> at mkdir-p.c in Gnulib but it’s a bit complicated…)
>
> After a quick glance it basically looks like after any error occurs
> from a mkdir call, it tests if the path exists and is a directory, and
> if so, proceeds ignoring that mkdir error. If mkdir fails and the
> directory doesn't exist afterwards, then the mkdir-p call fails with
> that error.
>
> That sounds like the best option to me: keeping mkdir-p independent of
> the mkdir implementation, while preserving the error from the first
> real problem it encounters. I'll send a patch with that change
> instead.
OK, makes sense, though it incurs an additional ‘stat’ call.
> If you'd still prefer to change the Hurd behavior, we could copy the
> bug-hurd list to discuss, since I'm not sure if such a change will
> have unintended consequences elsewhere.
I think we should do both: submit the Hurd change, which I think is a
good thing in the long run, and work around the problem here.
Ludo’.
prev parent reply other threads:[~2016-02-06 13:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 16:24 [PATCH shepherd] support: Ignore errors on parent directories in mkdir-p David Michael
2016-02-04 16:47 ` Ludovic Courtès
2016-02-05 18:22 ` David Michael
2016-02-06 13:14 ` Ludovic Courtès [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=87si16yo8n.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=fedora.dm0@gmail.com \
--cc=guix-devel@gnu.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.