guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/3] support: Rename user-dmddir to %user-shepherd-dir.


From: Ludovic Courtès
Subject: Re: [PATCH 3/3] support: Rename user-dmddir to %user-shepherd-dir.
Date: Sun, 17 Jan 2016 21:43:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Mathieu Lirzin <address@hidden> skribis:

> Mathieu Lirzin <address@hidden> 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’.



reply via email to

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