guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#36872] [PATCH v2 2/2] remote: Remove '--system' argument.


From: Jakob L. Kreuze
Subject: [bug#36872] [PATCH v2 2/2] remote: Remove '--system' argument.
Date: Tue, 06 Aug 2019 16:59:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux)

* gnu/services.scm (activation-script): Return a <program-file> rather
than a <scheme-file>.
* gnu/deploy.scm (guix-deploy): Remove handling for '--system'.
(show-help): Remove documentation for '--system'.
(%default-options): Remove default setting for 'system'.
---
 gnu/services.scm        | 56 ++++++++++++++++++++---------------------
 guix/scripts/deploy.scm |  8 ++----
 2 files changed, 30 insertions(+), 34 deletions(-)

diff --git a/gnu/services.scm b/gnu/services.scm
index 7de78105ff..6ee05d4580 100644
--- a/gnu/services.scm
+++ b/gnu/services.scm
@@ -430,34 +430,34 @@ ACTIVATION-SCRIPT-TYPE."
 (define (activation-script gexps)
   "Return the system's activation script, which evaluates GEXPS."
   (define actions
-    (map (cut scheme-file "activate-service" <>) gexps))
-
-  (scheme-file "activate"
-               (with-imported-modules (source-module-closure
-                                       '((gnu build activation)
-                                         (guix build utils)))
-                 #~(begin
-                     (use-modules (gnu build activation)
-                                  (guix build utils))
-
-                     ;; Make sure the user accounting database exists.  If it
-                     ;; does not exist, 'setutxent' does not create it and
-                     ;; thus there is no accounting at all.
-                     (close-port (open-file "/var/run/utmpx" "a0"))
-
-                     ;; Same for 'wtmp', which is populated by mingetty et
-                     ;; al.
-                     (mkdir-p "/var/log")
-                     (close-port (open-file "/var/log/wtmp" "a0"))
-
-                     ;; Set up /run/current-system.  Among other things this
-                     ;; sets up locales, which the activation snippets
-                     ;; executed below may expect.
-                     (activate-current-system)
-
-                     ;; Run the services' activation snippets.
-                     ;; TODO: Use 'load-compiled'.
-                     (for-each primitive-load '#$actions)))))
+    (map (cut program-file "activate-service.scm" <>) gexps))
+
+  (program-file "activate.scm"
+                (with-imported-modules (source-module-closure
+                                        '((gnu build activation)
+                                          (guix build utils)))
+                  #~(begin
+                      (use-modules (gnu build activation)
+                                   (guix build utils))
+
+                      ;; Make sure the user accounting database exists.  If it
+                      ;; does not exist, 'setutxent' does not create it and
+                      ;; thus there is no accounting at all.
+                      (close-port (open-file "/var/run/utmpx" "a0"))
+
+                      ;; Same for 'wtmp', which is populated by mingetty et
+                      ;; al.
+                      (mkdir-p "/var/log")
+                      (close-port (open-file "/var/log/wtmp" "a0"))
+
+                      ;; Set up /run/current-system.  Among other things this
+                      ;; sets up locales, which the activation snippets
+                      ;; executed below may expect.
+                      (activate-current-system)
+
+                      ;; Run the services' activation snippets.
+                      ;; TODO: Use 'load-compiled'.
+                      (for-each primitive-load '#$actions)))))
 
 (define (gexps->activation-gexp gexps)
   "Return a gexp that runs the activation script containing GEXPS."
diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index 52bba3f3bf..52d5e1e1da 100644
--- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -42,8 +42,6 @@
 (define (show-help)
   (display (G_ "Usage: guix deploy [OPTION] FILE...
 Perform the deployment specified by FILE.\n"))
-  (display (G_ "
-  -s, --system=SYSTEM    attempt to build for SYSTEM--e.g., \"i686-linux\""))
   (show-build-options-help)
   (newline)
   (display (G_ "
@@ -65,8 +63,7 @@ Perform the deployment specified by FILE.\n"))
          %standard-build-options))
 
 (define %default-options
-  `((system . ,(%current-system))
-    (substitutes? . #t)
+  `((substitutes? . #t)
     (build-hook? . #t)
     (graft? . #t)
     (debug . 0)
@@ -88,7 +85,6 @@ Perform the deployment specified by FILE.\n"))
       (set-build-options-from-command-line store opts)
       (for-each (lambda (machine)
                   (info (G_ "deploying to ~a...") (machine-display-name 
machine))
-                  (parameterize ((%current-system (assq-ref opts 'system))
-                                 (%graft? (assq-ref opts 'graft?)))
+                  (parameterize ((%graft? (assq-ref opts 'graft?)))
                     (run-with-store store (deploy-machine machine))))
                 machines))))
-- 
2.22.0






reply via email to

[Prev in Thread] Current Thread [Next in Thread]