bug-guix
[Top][All Lists]
Advanced

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

bug#63082: [PATCH 09/17] services: mpd: Let Shepherd effect the user/gro


From: Maxim Cournoyer
Subject: bug#63082: [PATCH 09/17] services: mpd: Let Shepherd effect the user/group change.
Date: Sat, 29 Apr 2023 12:52:08 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi Bruno,

Bruno Victal <mirai@makinata.eu> writes:

[...]

>> +  ;; Note: The user and its group are not serialized, otherwise MPD would
>> +  ;; attempt to switch the user/group itself.  The task of switching the
>> +  ;; user/group is left to Shepherd instead.
>>    (user
>>     (user-account %mpd-user)
>> -   "The user to run mpd as."
>> -   (sanitizer mpd-user-sanitizer))
>> +   "The user to run @command{mpd} as."
>> +   (sanitizer mpd-user-sanitizer)
>> +   (serializer empty-serializer))
>
> Simply write empty-serializer after sanitizer instead.

Done, and for other commits too, though both works and the procedure
version appeared more consistent/readable to my eyes.

>>                       "--cachedir" #$cache-directory)
>>                     #:environment-variables (list #$log-level*)
>> -                   #:log-file #$(if (string? log-to) log-to #f))))
>> +                   #:log-file #$(if (string? log-to) log-to #f)
>
> Generic advice but how about this instead?
>
> #$@(if (string? log-to) `(#:log-file ,log-to) '())
>
> It's cleaner to not explicitly set the keyword argument values when they're 
> not used.

They are used, but set to #f :-).  I have a slight preference for the
current version, which I find more readable.

-- 
Thanks,
Maxim





reply via email to

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