[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
05/07: environment: Parameterize ‘%graft?’ early on.
From: |
guix-commits |
Subject: |
05/07: environment: Parameterize ‘%graft?’ early on. |
Date: |
Fri, 27 Oct 2023 19:35:07 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 661672a7f82db706be8dcc962d5e2385bdcf8c78
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Oct 28 01:21:56 2023 +0200
environment: Parameterize ‘%graft?’ early on.
Previously, ‘%graft?’ would be parameterized after ‘package-derivation’
had been called for ‘%guile-for-build’, which is too late.
* guix/scripts/environment.scm (guix-environment*)[with-store/maybe]:
Parameterize ‘%graft?’.
Remove ‘%graft?’ parameterization from body.
Change-Id: I65ef4a8c5f27e19a49196005871e5f7057fabaec
---
guix/scripts/environment.scm | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index 61ef639b46..ad5d6a1026 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -1100,17 +1100,18 @@ command-line option processing with
'parse-command-line'."
;; Evaluate EXP... with STORE bound to a connection, unless
;; STORE-NEEDED? is false, in which case STORE is bound to #f.
(let ((proc (lambda (store) exp ...)))
- (if store-needed?
- (with-store s
- (set-build-options-from-command-line s opts)
- (with-build-handler (build-notifier #:use-substitutes?
- (assoc-ref opts
'substitutes?)
- #:verbosity
- (assoc-ref opts 'verbosity)
- #:dry-run?
- (assoc-ref opts 'dry-run?))
- (proc s)))
- (proc #f))))
+ (parameterize ((%graft? (assoc-ref opts 'graft?)))
+ (if store-needed?
+ (with-store s
+ (set-build-options-from-command-line s opts)
+ (with-build-handler (build-notifier #:use-substitutes?
+ (assoc-ref opts
'substitutes?)
+ #:verbosity
+ (assoc-ref opts 'verbosity)
+ #:dry-run?
+ (assoc-ref opts 'dry-run?))
+ (proc s)))
+ (proc #f)))))
(when container? (assert-container-features))
@@ -1146,8 +1147,7 @@ command-line option processing with 'parse-command-line'."
(warning (G_ "no packages specified; creating an empty
environment~%")))
;; Use the bootstrap Guile when requested.
- (parameterize ((%graft? (assoc-ref opts 'graft?))
- (%guile-for-build
+ (parameterize ((%guile-for-build
(and store-needed?
(package-derivation
store
- branch master updated (2de3004267 -> ff1146fb4f), guix-commits, 2023/10/27
- 05/07: environment: Parameterize ‘%graft?’ early on.,
guix-commits <=
- 02/07: environment: Honor ‘-s’ for guile-for-build., guix-commits, 2023/10/27
- 04/07: profiles: Hooks honor the #:system parameter of ‘profile-derivation’., guix-commits, 2023/10/27
- 01/07: grafts: Fix corner case involving multiple-output derivations., guix-commits, 2023/10/27
- 03/07: packages: Add ‘system’ parameter for ‘set-guile-for-build’., guix-commits, 2023/10/27
- 06/07: environment: Fix typo in error messages., guix-commits, 2023/10/27
- 07/07: tests: Adjust to cope with glibc graft., guix-commits, 2023/10/27