From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6LPZ-0007t9-CV for guix-patches@gnu.org; Wed, 11 Apr 2018 15:28:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6LPW-0002ct-9B for guix-patches@gnu.org; Wed, 11 Apr 2018 15:28:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:38612) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f6LPW-0002cm-5E for guix-patches@gnu.org; Wed, 11 Apr 2018 15:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f6LPV-0004Wd-TW for guix-patches@gnu.org; Wed, 11 Apr 2018 15:28:01 -0400 Subject: bug#31089: [PATCH 3/5] services: cgit: Add support for file-like objects. Resent-To: guix-patches@gnu.org Resent-Message-ID: References: <20180407170709.22160-1-clement@lassieur.org> <20180407170709.22160-3-clement@lassieur.org> <87r2nm6ams.fsf@gnu.org> <87woxei1iw.fsf@lassieur.org> From: =?UTF-8?Q?Cl=C3=A9ment?= Lassieur In-reply-to: <87woxei1iw.fsf@lassieur.org> Date: Wed, 11 Apr 2018 21:27:14 +0200 Message-ID: <87woxd8rxp.fsf@lassieur.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 31089-done@debbugs.gnu.org Clément Lassieur writes: > Ludovic Courtès 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.