From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7SsY-0002JB-C9 for guix-patches@gnu.org; Sun, 07 May 2017 16:34:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7SsU-0007gv-F5 for guix-patches@gnu.org; Sun, 07 May 2017 16:34:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:34382) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d7SsU-0007gr-BG for guix-patches@gnu.org; Sun, 07 May 2017 16:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d7SsU-0004Qt-5Z for guix-patches@gnu.org; Sun, 07 May 2017 16:34:02 -0400 Subject: bug#26339: [PATCH v3 6/9] scripts: system: Adapt "reconfigure" to new bootloader API. Resent-Message-ID: Date: Sun, 7 May 2017 22:33:32 +0200 From: Danny Milosavljevic Message-ID: <20170507223332.612b3785@scratchpost.org> In-Reply-To: <20170506154154.17836-7-m.othacehe@gmail.com> References: <20170506154154.17836-1-m.othacehe@gmail.com> <20170506154154.17836-7-m.othacehe@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Mathieu Othacehe Cc: 26339@debbugs.gnu.org Hi Mathieu, > +(define* (install-bootloader install-procedure > + #:key > + bootcfg bootcfg-location > + device target) Maybe "installer" instead of "install-procedure"? It's not that important but it reads better I think... >+(define (install-bootloader-derivation install-procedure >+ bootloader device target) >+ (with-monad %store-monad >+ (gexp->file "install-bootloader" >+ (with-imported-modules '((guix build utils)) >+ #~(begin >+ (use-modules (guix build utils)) >+ (#$install-procedure #$bootloader >+ #$device >+ #$target)))))) Hmm, importing (guix build utils) twice (on different sides, I guess)? Could use a comment... > + (install-proc > + (let ((procedure (bootloader-configuration-installer > + (operating-system-bootloader os))) > + (target (or target "/"))) > + (install-bootloader-derivation procedure bootloader device target))) Here, I'd use "bootloader-installer" instead of "install-proc" - because this specific procedure could install lots of things - it's the main entry point in a sense. Otherwise LGTM! I also think the general approach is good.