GNU bug report logs -
#31089
cgit service: add support for file-like objects
Previous Next
Full log
Message #46 received at 31089-done <at> debbugs.gnu.org (full text, mbox):
Clément Lassieur <clement <at> lassieur.org> writes:
> Ludovic Courtès <ludo <at> gnu.org> writes:
>
>>> (config-str
>>> (if opaque-config?
>>> (opaque-cgit-configuration-cgitrc config)
>>> - (with-output-to-string
>>> - (lambda ()
>>> - (serialize-configuration config
>>> - cgit-configuration-fields))))))
>>> + (serialize-configuration config cgit-configuration-fields))))
>>> #~(begin
>>> (use-modules (guix build utils))
>>> (mkdir-p #$(if opaque-config?
>>> (opaque-cgit-configuration-cache-root config)
>>> (cgit-configuration-cache-root config)))
>>> - (copy-file #$(plain-file "cgitrc" config-str) "/etc/cgitrc"))))
>>> + (copy-file #$(mixed-text-file "cgitrc" config-str)
>>> + "/etc/cgitrc"))))
>>
>> For clarity, since ‘config-str’ is no longer a string (right?), I’d
>> rename it to just ‘config’ or something.
>>
>> Also, could it be that you’re missing ‘apply’ above, as in:
>>
>> (apply mixed-text-file "cgitrc" config-str)
>>
>> ?
>
> Yes, config-str is still a string (or a string-valued gexp). I use
> mixed-text-file because it can take gexps as arguments, whereas
> plain-file can't.
>
>> Otherwise LGTM, thanks!
>
> Thank you for the review!
>
> Clément
Pushed.
This bug report was last modified 7 years and 45 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.