Alex Sassmannshausen <alex.sassmannshau...@gmail.com> skribis:

> Ludovic Courtès writes:

[...]

>>> + (register-services)
>>    ^
>>> +;; Send dmd into the background
>>> + (action 'dmd 'daemonize)
>>    ^
>>> + (for-each start '())
>>    ^
>>
>> Extra space here.
>
> The extra spaces were there to stop emacs (maybe Scheme mode?) from
> going nutty because of the open parens within a string at column 0.

Oh, right, I forgot that.

[...]

>>>          (let ((config-file (string-append user-dmddir "/init.scm")))
>>>            (cond ((not (file-exists? user-dmddir))
>>>                   (mkdir user-dmddir)
>>> +                 (make-bare-init-file config-file)
>>>                   config-file)
>>> +                ((not (file-exists? config-file))
>>> +                 (make-bare-init-file config-file))
>>>                  (else config-file))))))
>>
>> So I guess this should be changed to:
>>
>>   (catch 'system-error
>>     (lambda ()
>>       (mkdir user-dmddir)
>>       (make-bare-init-file config-file))
>>     (const #f))
>
> I've changed this to :
>
>          (catch-system-error (mkdir user-dmddir))
>          (if (not (file-exists? config-file))
>              (make-bare-init-file config-file))
>          config-file)))

[...]

> I also think the race condition should not be a problem for the config
> file: if the config file is added after the check, then we simply
> override it. If the config file is removed after the check then guix
> crashes when it tries to load it, as it always would do before this
> patch.

Right.  Hopefully it’s not a problem with the test suite because tests
use ‘-c’ anyway.

> Hope this works now. You should find the patch inline.

Yep.  Pushed, thanks!

Ludo’.

Reply via email to