[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Odd behavior with --dry-run and --upgrade
From: |
Ludovic Courtès |
Subject: |
Re: Odd behavior with --dry-run and --upgrade |
Date: |
Thu, 28 Jul 2016 00:19:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Alex Kost <address@hidden> skribis:
> I have zero knowledge in grafting, but if I checked it right, the
> attached patch should disable grafting for the emacs interface (when
> dry-run is on). If you think it should be a part of a bigger
> dry-run+no-grafts patch, please use it.
Two separate patches is fine, IMO.
> From d7747453bf31a616d414dce293fc0556d601abcb Mon Sep 17 00:00:00 2001
> From: Alex Kost <address@hidden>
> Date: Wed, 27 Jul 2016 14:55:50 +0300
> Subject: [PATCH] emacs: Disable grafts when dry-run is enabled.
>
> * emacs/guix-main.scm (process-package-actions): Set grafting according
> to 'dry-run?'.
> * guix/scripts.scm (build-package): Likewise.
[...]
> (define-module (guix scripts)
> + #:use-module (guix grafts)
> #:use-module (guix utils)
> #:use-module (guix ui)
> #:use-module (guix store)
> @@ -106,6 +107,7 @@ true."
> "Build PACKAGE using BUILD-OPTIONS acceptable by 'set-build-options'.
> Show what and how will/would be built."
> (mbegin %store-monad
> + (set-grafting (not dry-run?))
> (apply set-build-options*
> #:use-substitutes? use-substitutes?
> (strip-keyword-arguments '(#:dry-run?) build-options))
Here it might be best to do something like this:
(mlet %store-monad ((grafting? ((lift0 %graft? %store-monad))))
(set-grafting (and (not dry-run?) grafting?))
…)
This would make sure we don’t enable grafting if it turned out to be
disabled.
WDYT?
Ludo’.
- Odd behavior with --dry-run and --upgrade, Roel Janssen, 2016/07/23
- Re: Odd behavior with --dry-run and --upgrade, Leo Famulari, 2016/07/23
- Re: Odd behavior with --dry-run and --upgrade, Alex Kost, 2016/07/24
- Re: Odd behavior with --dry-run and --upgrade, Ludovic Courtès, 2016/07/24
- Re: Odd behavior with --dry-run and --upgrade, Andreas Enge, 2016/07/25
- Re: Odd behavior with --dry-run and --upgrade, Roel Janssen, 2016/07/25
- Re: Odd behavior with --dry-run and --upgrade, Ludovic Courtès, 2016/07/26
- Re: Odd behavior with --dry-run and --upgrade, Roel Janssen, 2016/07/26
- Re: Odd behavior with --dry-run and --upgrade, Ludovic Courtès, 2016/07/26
- Re: Odd behavior with --dry-run and --upgrade, Alex Kost, 2016/07/27
- Re: Odd behavior with --dry-run and --upgrade,
Ludovic Courtès <=
- Re: Odd behavior with --dry-run and --upgrade, Alex Kost, 2016/07/28
- Re: Odd behavior with --dry-run and --upgrade, Ludovic Courtès, 2016/07/28
- Re: Odd behavior with --dry-run and --upgrade, Alex Kost, 2016/07/30
- Re: Odd behavior with --dry-run and --upgrade, Ludovic Courtès, 2016/07/30
- Re: Odd behavior with --dry-run and --upgrade, Alex Kost, 2016/07/26
- Re: Odd behavior with --dry-run and --upgrade, Ludovic Courtès, 2016/07/26