From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCRMz-00048w-To for guix-patches@gnu.org; Sun, 21 May 2017 09:58:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCRMw-0005nh-S9 for guix-patches@gnu.org; Sun, 21 May 2017 09:58:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:56779) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCRMw-0005nd-No for guix-patches@gnu.org; Sun, 21 May 2017 09:58:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dCRMw-0000db-HH for guix-patches@gnu.org; Sun, 21 May 2017 09:58:02 -0400 Subject: bug#26339: [PATCH] scripts: system: Handle unspecified bootloader package and installer. References: <20170402134916.2871-1-m.othacehe@gmail.com> In-Reply-To: <20170402134916.2871-1-m.othacehe@gmail.com> Resent-Message-ID: From: Mathieu Othacehe Date: Sun, 21 May 2017 15:57:15 +0200 Message-Id: <20170521135715.14374-1-m.othacehe@gmail.com> 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: 26339@debbugs.gnu.org * guix/scripts/system.system (perform-action): If bootloader installer or bootloader package are #f, do not add them to drvs but keep things going. This allows to write (installer #f) or (package #f) in definition. Reported-by: Clément Lassieur . --- guix/scripts/system.scm | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm index 5e4574f7c..0e29d3c05 100644 --- a/guix/scripts/system.scm +++ b/guix/scripts/system.scm @@ -653,19 +653,20 @@ output when building a system derivation, such as a disk image." (bootloader-installer (let ((installer (bootloader-installer bootloader)) (target (or target "/"))) - (bootloader-installer-derivation installer - bootloader-package - device target))) + (if installer + (bootloader-installer-derivation installer + bootloader-package + device target) + (return #f)))) ;; For 'init' and 'reconfigure', always build BOOTCFG, even if ;; --no-bootloader is passed, because we then use it as a GC root. ;; See . (drvs -> (if (memq action '(init reconfigure)) - (if (and install-bootloader? bootloader-package) - (list sys bootcfg - bootloader-package - bootloader-installer) - (list sys bootcfg)) + (delete #f + (list sys bootcfg + bootloader-package + bootloader-installer)) (list sys))) (% (if derivations-only? (return (for-each (compose println derivation-file-name) -- 2.13.0