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: Mathieu Lirzin
Subject: Re: [PATCH 3/3] support: Rename user-dmddir to %user-shepherd-dir.
Date: Sun, 17 Jan 2016 22:51:59 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Mathieu Lirzin <address@hidden> skribis:
>
>> 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?

Attachment: test-suite.log
Description: Text document

Tell me if you want some more detailed log.  :)

>> 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?

Shepherd config user directories are created with #o700 permissions.
Since it is possible to set an arbitrary value in XDG_CONFIG_HOME, my
understanding was that Shepherd is supposed to try to create the
directory composing this directory name if they don't exist.  So to
create them It is convenient to have a MODE argument for ‘mkdir-p’.

> 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?

I don't know.  mkdir(1) let the users do it, so I guess it makes sense
to handle the case.

--
Mathieu Lirzin

reply via email to

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