[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/10: guix system: Honor the build options in 'delete-generations'.
From: |
guix-commits |
Subject: |
01/10: guix system: Honor the build options in 'delete-generations'. |
Date: |
Sat, 21 Dec 2019 17:55:50 -0500 (EST) |
civodul pushed a commit to branch master
in repository guix.
commit 89bbcc80d7a6867515ba1057c98accf41cbb9077
Author: Ludovic Courtès <address@hidden>
Date: Sat Dec 21 16:27:31 2019 +0100
guix system: Honor the build options in 'delete-generations'.
Until now, 'guix system delete-generations' would ignore OPTS; for
example, it would not enable #:print-extended-build-trace? & co.,
leading to suboptimal output.
* guix/scripts/system.scm (process-command)[with-store*]: New macro.
Use it for 'delete-generations', 'switch-generation', and 'roll-back'.
---
guix/scripts/system.scm | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 3e95707..e69a3b6 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -1189,6 +1189,11 @@ resulting from command-line parsing."
(define (process-command command args opts)
"Process COMMAND, one of the 'guix system' sub-commands. ARGS is its
argument list and OPTS is the option alist."
+ (define-syntax-rule (with-store* store exp ...)
+ (with-store store
+ (set-build-options-from-command-line store opts)
+ exp ...))
+
(case command
;; The following commands do not need to use the store, and they do not
need
;; an operating system configuration file.
@@ -1213,22 +1218,20 @@ argument list and OPTS is the option alist."
(() #f)
((pattern) pattern)
(x (leave (G_ "wrong number of arguments~%"))))))
- (with-store store
+ (with-store* store
(delete-matching-generations store %system-profile pattern)
(reinstall-bootloader store (generation-number %system-profile)))))
((switch-generation)
(let ((pattern (match args
((pattern) pattern)
(x (leave (G_ "wrong number of arguments~%"))))))
- (with-store store
- (set-build-options-from-command-line store opts)
+ (with-store* store
(switch-to-system-generation store pattern))))
((roll-back)
(let ((pattern (match args
(() "")
(x (leave (G_ "wrong number of arguments~%"))))))
- (with-store store
- (set-build-options-from-command-line store opts)
+ (with-store* store
(roll-back-system store))))
;; The following commands need to use the store, and they also
;; need an operating system configuration file.
@@ -1297,6 +1300,7 @@ argument list and OPTS is the option alist."
;;; Local Variables:
;;; eval: (put 'call-with-service-upgrade-info 'scheme-indent-function 1)
+;;; eval: (put 'with-store* 'scheme-indent-function 1)
;;; End:
;;; system.scm ends here
- branch master updated (223cb7c -> 345488d), guix-commits, 2019/12/21
- 02/10: gnu: mumi: Do not hard-code "2.2"., guix-commits, 2019/12/21
- 03/10: gnu: mumi: Install .go files in the right place., guix-commits, 2019/12/21
- 01/10: guix system: Honor the build options in 'delete-generations'.,
guix-commits <=
- 05/10: gnu: mumi: Pass "--localstatedir=/var"., guix-commits, 2019/12/21
- 07/10: gnu: mumi: Add dependency on GnuTLS., guix-commits, 2019/12/21
- 09/10: gnu: libgtextutils: Build with GCC 5, guix-commits, 2019/12/21
- 08/10: services: Add Mumi service., guix-commits, 2019/12/21
- 10/10: gnu: fastx-toolkit: Build with GCC 6, guix-commits, 2019/12/21
- 06/10: gnu: mumi: Install assets., guix-commits, 2019/12/21
- 04/10: gnu: mumi: Add dependency on mumimu., guix-commits, 2019/12/21