remote: Remove '--system' argument.

* 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'.
master
Jakob L. Kreuze 2019-08-09 14:25:54 -04:00 committed by Christopher Lemmer Webber
parent 2c8e04f136
commit 03cbd94d48
No known key found for this signature in database
GPG Key ID: 4BC025925FF8F4D3
2 changed files with 25 additions and 29 deletions

View File

@ -430,34 +430,34 @@ ACTIVATION-SCRIPT-TYPE."
(define (activation-script gexps) (define (activation-script gexps)
"Return the system's activation script, which evaluates GEXPS." "Return the system's activation script, which evaluates GEXPS."
(define actions (define actions
(map (cut scheme-file "activate-service" <>) gexps)) (map (cut program-file "activate-service.scm" <>) gexps))
(scheme-file "activate" (program-file "activate.scm"
(with-imported-modules (source-module-closure (with-imported-modules (source-module-closure
'((gnu build activation) '((gnu build activation)
(guix build utils))) (guix build utils)))
#~(begin #~(begin
(use-modules (gnu build activation) (use-modules (gnu build activation)
(guix build utils)) (guix build utils))
;; Make sure the user accounting database exists. If it ;; Make sure the user accounting database exists. If it
;; does not exist, 'setutxent' does not create it and ;; does not exist, 'setutxent' does not create it and
;; thus there is no accounting at all. ;; thus there is no accounting at all.
(close-port (open-file "/var/run/utmpx" "a0")) (close-port (open-file "/var/run/utmpx" "a0"))
;; Same for 'wtmp', which is populated by mingetty et ;; Same for 'wtmp', which is populated by mingetty et
;; al. ;; al.
(mkdir-p "/var/log") (mkdir-p "/var/log")
(close-port (open-file "/var/log/wtmp" "a0")) (close-port (open-file "/var/log/wtmp" "a0"))
;; Set up /run/current-system. Among other things this ;; Set up /run/current-system. Among other things this
;; sets up locales, which the activation snippets ;; sets up locales, which the activation snippets
;; executed below may expect. ;; executed below may expect.
(activate-current-system) (activate-current-system)
;; Run the services' activation snippets. ;; Run the services' activation snippets.
;; TODO: Use 'load-compiled'. ;; TODO: Use 'load-compiled'.
(for-each primitive-load '#$actions))))) (for-each primitive-load '#$actions)))))
(define (gexps->activation-gexp gexps) (define (gexps->activation-gexp gexps)
"Return a gexp that runs the activation script containing GEXPS." "Return a gexp that runs the activation script containing GEXPS."

View File

@ -43,8 +43,6 @@
(define (show-help) (define (show-help)
(display (G_ "Usage: guix deploy [OPTION] FILE... (display (G_ "Usage: guix deploy [OPTION] FILE...
Perform the deployment specified by FILE.\n")) 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) (show-build-options-help)
(newline) (newline)
(display (G_ " (display (G_ "
@ -66,8 +64,7 @@ Perform the deployment specified by FILE.\n"))
%standard-build-options)) %standard-build-options))
(define %default-options (define %default-options
`((system . ,(%current-system)) `((substitutes? . #t)
(substitutes? . #t)
(build-hook? . #t) (build-hook? . #t)
(graft? . #t) (graft? . #t)
(debug . 0) (debug . 0)
@ -92,7 +89,6 @@ Perform the deployment specified by FILE.\n"))
(set-build-options-from-command-line store opts) (set-build-options-from-command-line store opts)
(for-each (lambda (machine) (for-each (lambda (machine)
(info (G_ "deploying to ~a...") (machine-display-name machine)) (info (G_ "deploying to ~a...") (machine-display-name machine))
(parameterize ((%current-system (assq-ref opts 'system)) (parameterize ((%graft? (assq-ref opts 'graft?)))
(%graft? (assq-ref opts 'graft?)))
(run-with-store store (deploy-machine machine)))) (run-with-store store (deploy-machine machine))))
machines)))) machines))))