GNU bug report logs -
#46560
[PATCH 0/2] Activate system when switching generations.
Previous Next
Reported by: Brice Waegeneire <brice <at> waegenei.re>
Date: Tue, 16 Feb 2021 13:01:01 UTC
Severity: normal
Tags: patch
Done: Brice Waegeneire <brice <at> waegenei.re>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 46560 <at> debbugs.gnu.org (full text, mbox):
Fixes #38884.
* guix/scripts/system.scm (switch-to-system-generation): Load the
activate script for that generation.
---
guix/scripts/system.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 19b8c5163c..4c7af52ad5 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke <at> gnu.org>
;;; Copyright © 2020 Julien Lepiller <julien <at> lepiller.eu>
;;; Copyright © 2020 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2021 Brice Waegeneire <brice <at> waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -363,11 +364,14 @@ connection to the store."
"Switch the system profile to the generation specified by SPEC, and
re-install bootloader with a configuration file that uses the specified system
generation as its default entry. STORE is an open connection to the store."
- (let ((number (relative-generation-spec->number %system-profile spec)))
+ (let* ((number (relative-generation-spec->number %system-profile spec))
+ (generation (generation-file-name %system-profile number))
+ (activate (string-append generation "/activate")))
(if number
(begin
(reinstall-bootloader store number)
- (switch-to-generation* %system-profile number))
+ (switch-to-generation* %system-profile number)
+ (primitive-load activate))
(leave (G_ "cannot switch to system generation '~a'~%") spec))))
(define* (system-bootloader-name #:optional (system %system-profile))
--
2.30.1
This bug report was last modified 4 years and 74 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.