GNU bug report logs -
#36404
[PATCH 0/6] Add 'guix deploy'.
Previous Next
Full log
Message #280 received at 36404 <at> debbugs.gnu.org (full text, mbox):
zerodaysfordays <at> sdf.lonestar.org (Jakob L. Kreuze) skribis:
> * guix/scripts/system/reconfigure.scm: New file.
> * Makefile.am (MODULES): Add it.
> * guix/scripts/system.scm (bootloader-installer-script): Export variable.
> +;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays <at> sdf.lonestar.org>
Could you preserve the copyright lines of (guix scripts system) that
apply to these portions of code, roughly?
I think all the procedures in (guix scripts system reconfigure) could
return a <scheme-file> rather than a gexp. Actually a <program-file>
would even be cleaner than a <scheme-file>, as it could better handle
transitions like you’re on a Guile 2.2 system reconfiguring towards a
Guile 3 system.
Consequently you could rename ‘switch-to-system’ to
‘switch-system-program’, and so on.
> +(define (switch-to-system system-derivation activation-script)
I think it could simply take an <operating-system> record and derive the
relevant bits from that.
> + (switch-symlinks generation system)
> + (switch-symlinks %system-profile generation)
> + ;; The implementation of 'guix system reconfigure' saves the
> + ;; load path and environment here. This is unnecessary here
> + ;; because each invocation of 'remote-eval' runs in a distinct
> + ;; Guile REPL.
> + (setenv "GUIX_NEW_SYSTEM" system)
This comment may become irrelevant.
> + ;; The activation script may write to stdout, which confuses
> + ;; 'remote-eval' when it attempts to read a result from the
> + ;; remote REPL. We work around this by forcing the output to a
> + ;; string.
> + (with-output-to-string
> + (lambda ()
> + (primitive-load #$activation-script))))))))
Same here? For ‘guix system reconfigure’, we’d rather not lose messages
written to stdout by ACTIVATION-SCRIPT.
> + (unless (false-if-exception
> + (begin
> + ;; The implementation of 'guix system reconfigure'
> + ;; saves the load path here. This is unnecessary here
> + ;; because each invocation of 'remote-eval' runs in a
> + ;; distinct Guile REPL.
> + (install-boot-config #$bootcfg #$bootcfg-file #$target)
> + ;; The installation script may write to stdout, which
> + ;; confuses 'remote-eval' when it attempts to read a
> + ;; result from the remote REPL. We work around this
> + ;; by forcing the output to a string.
> + (with-output-to-string
> + (lambda ()
> + (primitive-load #$installer-script)))))
Same as above.
Ludo’.
This bug report was last modified 6 years and 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.