From a82a201a8d8b324d3e4f85c0faab02cce04f7b28 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Wed, 27 Jul 2016 14:55:50 +0300 Subject: emacs: Disable grafts when dry-run is enabled. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * emacs/guix-main.scm (process-package-actions): Set grafting according to 'dry-run?'. * guix/scripts.scm (build-package): Disable grafts when 'dry-run?' is #t. Co-authored-by: Ludovic Courtès --- guix/scripts.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'guix/scripts.scm') diff --git a/guix/scripts.scm b/guix/scripts.scm index d84375f570..bbee50bc3d 100644 --- a/guix/scripts.scm +++ b/guix/scripts.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès ;;; Copyright © 2014 Deck Pickard -;;; Copyright © 2015 Alex Kost +;;; Copyright © 2015, 2016 Alex Kost ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +19,7 @@ ;;; along with GNU Guix. If not, see . (define-module (guix scripts) + #:use-module (guix grafts) #:use-module (guix utils) #:use-module (guix ui) #:use-module (guix store) @@ -105,11 +106,13 @@ (define* (build-package package #:rest build-options) "Build PACKAGE using BUILD-OPTIONS acceptable by 'set-build-options'. Show what and how will/would be built." - (mbegin %store-monad + (mlet %store-monad ((grafting? ((lift0 %graft? %store-monad)))) (apply set-build-options* #:use-substitutes? use-substitutes? (strip-keyword-arguments '(#:dry-run?) build-options)) - (mlet %store-monad ((derivation (package->derivation package))) + (mlet %store-monad ((derivation (package->derivation + package #:graft? (and (not dry-run?) + grafting?)))) (mbegin %store-monad (maybe-build (list derivation) #:use-substitutes? use-substitutes? -- cgit v1.2.3