From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Odd behavior with --dry-run and --upgrade Date: Sun, 31 Jul 2016 00:51:22 +0200 Message-ID: <87shuq91ud.fsf@gnu.org> References: <87y44sqtiw.fsf@gnu.org> <87h9bfcteu.fsf@gmail.com> <87y44q8yta.fsf@gnu.org> <8760rtbc14.fsf@gnu.org> <87r3agd8yg.fsf@gnu.org> <87mvl41z1a.fsf@gnu.org> <87r3ag8tc1.fsf@gnu.org> <87twfbth7w.fsf@gmail.com> <87lh0mvi4f.fsf@gnu.org> <87twfa19dw.fsf@gmail.com> <87bn1hj4qs.fsf@gnu.org> <8760rnb12h.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bTd6R-00043x-Ef for guix-devel@gnu.org; Sat, 30 Jul 2016 18:51:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bTd6N-0007Sg-AS for guix-devel@gnu.org; Sat, 30 Jul 2016 18:51:30 -0400 In-Reply-To: <8760rnb12h.fsf@gmail.com> (Alex Kost's message of "Sat, 30 Jul 2016 18:25:10 +0300") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Alex Kost Cc: guix-devel Alex Kost skribis: > Ludovic Court=C3=A8s (2016-07-28 16:01 +0300) wrote: [...] >> --- a/guix/scripts.scm >> +++ b/guix/scripts.scm >> @@ -22,6 +22,7 @@ >> #:use-module (guix utils) >> #:use-module (guix ui) >> #:use-module (guix store) >> + #:use-module (guix grafts) >> #:use-module (guix monads) >> #:use-module (guix packages) >> #:use-module (guix derivations) >> @@ -105,11 +106,14 @@ true." >> #: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? >> >> Using #:graft? is cleaner anyway. > > Indeed! Since you said it's OK to make separate patches for this > "dry-run + no-grafts" change (for CLI and Emacs UI), I committed it as > a82a201. Perfect, thanks! Ludo=E2=80=99.