From: ludo@gnu.org (Ludovic Courtès)
To: Mathieu Lirzin <mthl@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 3/3] support: Rename user-dmddir to %user-shepherd-dir.
Date: Sun, 17 Jan 2016 21:43:16 +0100 [thread overview]
Message-ID: <877fj8544b.fsf@gnu.org> (raw)
In-Reply-To: <87a8o42tdo.fsf@gnu.org> (Mathieu Lirzin's message of "Sun, 17 Jan 2016 15:05:55 +0100")
Mathieu Lirzin <mthl@gnu.org> skribis:
> Mathieu Lirzin <mthl@gnu.org> writes:
>
>> * modules/shepherd/support.scm (user-dmddir): Rename to ...
>> (%user-shepherd-dir): ... this. Honor XDG variables and use
>> '~/.config/shepherd' as default value. All consumers changed.
>> (mkdir-p): New procedure. Export it.
>> (default-config-file): Use it.
>> (verify-dir): Likewise.
>> ---
>> modules/shepherd/support.scm | 45 ++++++++++++++++++++++++++++++++++++--------
>> 1 file changed, 37 insertions(+), 8 deletions(-)
> [...]
>> +(define* (mkdir-p dir #:optional (mode (umask))) ;copied from Guix
> ^^^
> not in Guix yet.
[...]
> I have tried to apply this change (add an optional parameter) on top of
> Guix, but it produces a ton of failures for ‘make check’ :).
What’s the failure exactly?
> So my conclusion is that it is not possible to set a default value. So I
> think it required to do something like:
>
> (define* (mkdir-p dir #:optional mode)
> ...
> (if mode
> (mkdir path mode)
> (mkdir path))
> ...)
>
> Am I correct?
That would work… but why do we need ‘mode’ in the first place?
It seems that the semantics are fuzzy, because the result may differ
depending on which components of DIR already exist when ‘mkdir-p’ is
called, and the user can just set the process’ umask before calling it.
WDYT?
Ludo’.
next prev parent reply other threads:[~2016-01-17 20:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-16 22:17 [PATCH 0/3] [Shepherd][PATCH 0/3] Change configuration file Mathieu Lirzin
2016-01-16 22:17 ` [PATCH 1/3] maint: Add .dir-locals.el Mathieu Lirzin
2016-01-17 14:07 ` Ludovic Courtès
2016-01-16 22:17 ` [PATCH 2/3] support: Add a keyword argument '#:secure?' to verify-dir Mathieu Lirzin
2016-01-17 14:08 ` Ludovic Courtès
2016-01-16 22:17 ` [PATCH 3/3] support: Rename user-dmddir to %user-shepherd-dir Mathieu Lirzin
2016-01-17 14:05 ` Mathieu Lirzin
2016-01-17 20:43 ` Ludovic Courtès [this message]
2016-01-17 21:51 ` Mathieu Lirzin
2016-01-18 21:08 ` Ludovic Courtès
2016-01-17 14:19 ` Ludovic Courtès
2016-01-17 20:49 ` Mathieu Lirzin
2016-01-17 21:06 ` Mathieu Lirzin
2016-01-18 20:59 ` Ludovic Courtès
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=877fj8544b.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=mthl@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.