[PATCH 1/3] guix build, daemon: Rename "--no-build-hook" to "--no-offload".

  • Done
  • quality assurance status badge
Details
2 participants
  • Carl Dong
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 21 Nov 2019 15:58
(address . guix-patches@gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20191121145830.20871-1-ludo@gnu.org
This is a followup to bc69ea2d605810cc32e13ed03d5848b8dc358b61.

* guix/scripts/build.scm (show-build-options-help): Rename
"--no-build-hook" to "--no-offload".
(%standard-build-options): Likewise, and warn when "--no-build-hook" is
passed.
* nix/nix-daemon/guix-daemon.cc (options): Add "--no-offload" and mark
"--no-build-hook" as hidden.
* guix/scripts/offload.scm: Adjust comment.
* doc/guix.texi (Invoking guix-daemon, Common Build Options): Replace
"--no-build-hook" with "--no-offload".
* etc/completion/fish/guix.fish, etc/completion/zsh/_guix: Adjust
accordingly.
---
doc/guix.texi | 20 +++++++++-----------
etc/completion/fish/guix.fish | 28 ++++++++++++++--------------
etc/completion/zsh/_guix | 8 ++++----
guix/scripts/build.scm | 8 ++++++--
guix/scripts/offload.scm | 2 +-
nix/nix-daemon/guix-daemon.cc | 7 +++++--
6 files changed, 39 insertions(+), 34 deletions(-)

Toggle diff (179 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index 1f120b0501..b1c615235b 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -1368,13 +1368,11 @@ source URLs. When this option is omitted,
This means that substitutes may be downloaded from @var{urls}, as long
as they are signed by a trusted signature (@pxref{Substitutes}).
-@cindex build hook
-@item --no-build-hook
-Do not use the @dfn{build hook}.
-
-The build hook is a helper program that the daemon can start and to
-which it submits build requests. This mechanism is used to offload
-builds to other machines (@pxref{Daemon Offload Setup}).
+@cindex offloading
+@item --no-offload
+Do not use offload builds to other machines (@pxref{Daemon Offload
+Setup}). That is, always build things locally instead of offloading
+builds to remote machines.
@item --cache-failures
Cache build failures. By default, only successful builds are cached.
@@ -8109,10 +8107,10 @@ stashing one of the build results with @code{guix archive --export}
(@pxref{Invoking guix archive}), then rebuilding, and finally comparing
the two results.
-@item --no-build-hook
-Do not attempt to offload builds @i{via} the ``build hook'' of the daemon
-(@pxref{Daemon Offload Setup}). That is, always build things locally
-instead of offloading builds to remote machines.
+@item --no-offload
+Do not use offload builds to other machines (@pxref{Daemon Offload
+Setup}). That is, always build things locally instead of offloading
+builds to remote machines.
@item --max-silent-time=@var{seconds}
When the build or substitution process remains silent for more than
diff --git a/etc/completion/fish/guix.fish b/etc/completion/fish/guix.fish
index 525d39679d..6582f3a186 100644
--- a/etc/completion/fish/guix.fish
+++ b/etc/completion/fish/guix.fish
@@ -133,7 +133,7 @@ complete -f -c guix -n '__fish_guix_using_command pull' -l url -d 'download the
complete -f -c guix -n '__fish_guix_using_command pull' -l bootstrap -d 'use the bootstrap Guile to build the new Guix'
#### system
-set -l remotecommands reconfigure roll-back switch-generation list-generations build container vm vm-image disk-image init extension-graph shepherd-graph load-path keep-failed keep-going dry-run fallback no-substitutes substitutes-urls no-grafts no-build-hook max-silent-time timeout verbosity rounds cores max-jobs derivation on-error image-size no-grub share expose full-boot
+set -l remotecommands reconfigure roll-back switch-generation list-generations build container vm vm-image disk-image init extension-graph shepherd-graph load-path keep-failed keep-going dry-run fallback no-substitutes substitutes-urls no-grafts no-offload max-silent-time timeout verbosity rounds cores max-jobs derivation on-error image-size no-grub share expose full-boot
complete -f -c guix -n '__fish_guix_needs_command' -a system -d 'Build the operating system declared in FILE according to ACTION.'
complete -f -c guix -n '__fish_guix_using_command system' -l reconfigure -d 'switch to a new operating system configuration'
complete -f -c guix -n '__fish_guix_using_command system' -l roll-back -d 'switch to the previous operating system configuration'
@@ -156,7 +156,7 @@ complete -f -c guix -n '__fish_guix_using_command system' -l fallback -d 'fall b
complete -f -c guix -n '__fish_guix_using_command system' -l no-substitutes -d 'build instead of resorting to pre-built substitutes'
complete -f -c guix -n '__fish_guix_using_command system' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
complete -f -c guix -n '__fish_guix_using_command system' -l no-grafts -d 'do not graft packages'
-complete -f -c guix -n '__fish_guix_using_command system' -l no-build-hook -d 'do not attempt to offload builds via the build hook'
+complete -f -c guix -n '__fish_guix_using_command system' -l no-offload -d 'do not attempt to offload builds'
complete -f -c guix -n '__fish_guix_using_command system' -a "--max-silent-time=" -d 'mark the build as failed after SECONDS of silence'
complete -f -c guix -n '__fish_guix_using_command system' -a "--timeout=" -d 'mark the build as failed after SECONDS of activity'
complete -f -c guix -n '__fish_guix_using_command system' -a "--verbosity=" -d 'use the given verbosity LEVEL'
@@ -174,7 +174,7 @@ complete -f -c guix -n '__fish_guix_using_command system' -a "--expose=" -d 'for
complete -f -c guix -n '__fish_guix_using_command system' -l full-boot -d 'for \'vm\', make a full boot sequence'
#### build
-set -l remotecommands expression file source sources system target derivations check repair root quiet log-file load-path keep-failed keep-going dry-run fallback no-substitutes substitute-urls no-grafts no-build-hook max-silent-time timeout verbosity rounds cores max-jobs with-source with-input with-graft
+set -l remotecommands expression file source sources system target derivations check repair root quiet log-file load-path keep-failed keep-going dry-run fallback no-substitutes substitute-urls no-grafts no-offload max-silent-time timeout verbosity rounds cores max-jobs with-source with-input with-graft
complete -f -c guix -n '__fish_guix_needs_command' -a build -d 'Build the given PACKAGE-OR-DERIVATION and return their output paths.'
complete -f -c guix -n '__fish_guix_using_command build' -a "--expression=" -d 'build the package or derivation EXPR evaluates to'
complete -f -c guix -n '__fish_guix_using_command build' -s f -d 'build the package or derivation that the code within FILE evaluates to' --exclusive --arguments "(ls -ap)"
@@ -201,7 +201,7 @@ complete -f -c guix -n '__fish_guix_using_command build' -l fallback -d 'fall ba
complete -f -c guix -n '__fish_guix_using_command build' -l no-substitutes -d 'build instead of resorting to pre-built substitutes'
complete -f -c guix -n '__fish_guix_using_command build' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
complete -f -c guix -n '__fish_guix_using_command build' -l no-grafts -d 'do not graft packages'
-complete -f -c guix -n '__fish_guix_using_command build' -l no-build-hook -d 'do not attempt to offload builds via the build hook'
+complete -f -c guix -n '__fish_guix_using_command build' -l no-offload -d 'do not attempt to offload builds'
complete -f -c guix -n '__fish_guix_using_command build' -a "--max-silent-time=" -d 'mark the build as failed after SECONDS of silence'
complete -f -c guix -n '__fish_guix_using_command build' -a "--timeout=" -d 'mark the build as failed after SECONDS of activity'
complete -f -c guix -n '__fish_guix_using_command build' -a "--verbosity=" -d 'use the given verbosity LEVEL'
@@ -215,7 +215,7 @@ complete -f -c guix -n '__fish_guix_using_command build' -a "--with-input=" -d '
complete -f -c guix -n '__fish_guix_using_command build' -a "--with-graft=" -d 'PACKAGE=REPLACEMENT .. graft REPLACEMENT on packages that refer to PACKAGE'
#### package
-set -l remotecommands install install-from-expression install-from-file remove upgrade manifest do-no-upgrade roll-back search-paths list-generations delete-generations switch-generation profile bootstrap verbose search list-installed list-available show load-path keep-failed keep-going dry-run fallback no.substitutes substitute-urls no-grafts no-build-hook max-silent-time timenout verbosity rounds cores max-jobs with-source with-input with-graft
+set -l remotecommands install install-from-expression install-from-file remove upgrade manifest do-no-upgrade roll-back search-paths list-generations delete-generations switch-generation profile bootstrap verbose search list-installed list-available show load-path keep-failed keep-going dry-run fallback no.substitutes substitute-urls no-grafts no-offload max-silent-time timenout verbosity rounds cores max-jobs with-source with-input with-graft
complete -f -c guix -n '__fish_guix_needs_command' -a package -d 'Install, remove, or upgrade packages in a single transaction.'
complete -f -c guix -n '__fish_guix_using_command package' -s i -l install -d 'install PACKAGEs'
complete -f -c guix -n '__fish_guix_using_command package' -s e -d 'install the package EXP evaluates to'
@@ -252,7 +252,7 @@ complete -f -c guix -n '__fish_guix_using_command package' -l fallback -d 'fall
complete -f -c guix -n '__fish_guix_using_command package' -l no-substitutes -d 'build instead of resorting to pre-built substitutes'
complete -f -c guix -n '__fish_guix_using_command package' -a "--substitute-urls=" -d 'URLS fetch substitute from URLS if they are authorized'
complete -f -c guix -n '__fish_guix_using_command package' -l no-grafts -d 'do not graft packages'
-complete -f -c guix -n '__fish_guix_using_command package' -l no-build-hook -d 'do not attempt to offload builds via the build hook'
+complete -f -c guix -n '__fish_guix_using_command package' -l no-offload -d 'do not attempt to offload builds'
complete -f -c guix -n '__fish_guix_using_command package' -a "--max-silent-time=" -d 'SECONDS mark the build as failed after SECONDS of silence'
complete -f -c guix -n '__fish_guix_using_command package' -a "--timeout=" -d 'SECONDS mark the build as failed after SECONDS of activity'
complete -f -c guix -n '__fish_guix_using_command package' -a "--verbosity=" -d 'LEVEL use the given verbosity LEVEL'
@@ -391,7 +391,7 @@ complete -f -c guix -n '__fish_guix_using_command gc' -l list-failures -d 'list
complete -f -c guix -n '__fish_guix_using_command gc' -l clear-failures -d 'remove PATHS from the set of cached failures'
#### environment
-set -l remotecommands expression load ad-hoc pure search-paths system root container network share expose bootstrap load-path keep-failed keep-going dry-run fallback no-substitutes substitute-urls no-grafts no-build-hook max-silent-time timeout verbosity rounds cores max-jobs
+set -l remotecommands expression load ad-hoc pure search-paths system root container network share expose bootstrap load-path keep-failed keep-going dry-run fallback no-substitutes substitute-urls no-grafts no-offload max-silent-time timeout verbosity rounds cores max-jobs
complete -f -c guix -n '__fish_guix_needs_command' -a environment -d 'Build an environment that includes the dependencies of PACKAGE and execute COMMAND or an interactive shell in that environment.'
complete -f -c guix -n '__fish_guix_using_command environment' -s e -d 'Create environment for the package that EXPR evaluates to'
complete -f -c guix -n '__fish_guix_using_command environment' -a "--expression=" -d 'Create environment for the package that EXPR evaluates to'
@@ -418,7 +418,7 @@ complete -f -c guix -n '__fish_guix_using_command environment' -l fallback -d 'f
complete -f -c guix -n '__fish_guix_using_command environment' -l no-substitutes -d 'build instead of resorting to pre-built substitutes'
complete -f -c guix -n '__fish_guix_using_command environment' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
complete -f -c guix -n '__fish_guix_using_command environment' -l no-grafts -d 'do not graft packages'
-complete -f -c guix -n '__fish_guix_using_command environment' -l no-build-hook -d 'do not attempt to offload builds via the build hook'
+complete -f -c guix -n '__fish_guix_using_command environment' -l no-offload -d 'do not attempt to offload builds'
complete -f -c guix -n '__fish_guix_using_command environment' -a "--max-silent-time=" -d 'mark the build as failed after SECONDS of silence'
complete -f -c guix -n '__fish_guix_using_command environment' -a "--timeout=" -d 'mark the build as failed after SECONDS of activity'
complete -f -c guix -n '__fish_guix_using_command environment' -a "--verbosity=" -d 'use the given verbosity LEVEL'
@@ -432,7 +432,7 @@ complete -f -c guix -n '__fish_guix_using_command environment' -a "--max-jobs="
complete -f -c guix -n '__fish_guix_needs_command' -a edit -d 'Start $VISUAL or $EDITOR to edit the definitions of PACKAGE.'
#### copy
-set -l remotecommands to= from= load-path= keep-failed keep-going dry-run fallback no-substitutes substitute-urls= no-grafts no-build-hook max-silent-time= timeout= verbosity= rounds= cores= max-jobs=
+set -l remotecommands to= from= load-path= keep-failed keep-going dry-run fallback no-substitutes substitute-urls= no-grafts no-offload max-silent-time= timeout= verbosity= rounds= cores= max-jobs=
complete -f -c guix -n '__fish_guix_needs_command' -a copy -d 'Copy ITEMS to or from the specified host over SSH.'
complete -f -c guix -n '__fish_guix_using_command copy' -a "--to=" -d 'send ITEMS to HOST'
complete -f -c guix -n '__fish_guix_using_command copy' -a "--from=" -d 'receive ITEMS from HOST'
@@ -445,7 +445,7 @@ complete -f -c guix -n '__fish_guix_using_command copy' -l fallback -d 'fall bac
complete -f -c guix -n '__fish_guix_using_command copy' -l no-substitutes -d 'build instead of resorting to pre-built substitutes'
complete -f -c guix -n '__fish_guix_using_command copy' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
complete -f -c guix -n '__fish_guix_using_command copy' -l no-grafts -d 'do not graft packages'
-complete -f -c guix -n '__fish_guix_using_command copy' -l no-build-hook -d 'do not attempt to offload builds via the build hook'
+complete -f -c guix -n '__fish_guix_using_command copy' -l no-offload -d 'do not attempt to offload builds'
complete -f -c guix -n '__fish_guix_using_command copy' -a "--max-silent-time=" -d 'mark the build as failed after SECONDS of silence'
complete -f -c guix -n '__fish_guix_using_command copy' -a "--timeout=" -d 'mark the build as failed after SECONDS of activity'
complete -f -c guix -n '__fish_guix_using_command copy' -a "--verbosity=" -d 'use the given verbosity LEVEL'
@@ -467,7 +467,7 @@ complete -f -c guix -n '__fish_guix_using_command challenge' -a "--substitute-ur
complete -f -c guix -n '__fish_guix_using_command challenge' -s v -l verbose -d 'show details about successful comparisons'
#### archive
-set -l remotecommands export format= recursive import missing extract= generate-key authorize expression= source system= target= load-path= keep-failed keep-going dry-run fallback no-substitutes substitute-urls= no-grafts no-build-hook max-silent-time= timeout= verbosity= rounds= cores= max-jobs=
+set -l remotecommands export format= recursive import missing extract= generate-key authorize expression= source system= target= load-path= keep-failed keep-going dry-run fallback no-substitutes substitute-urls= no-grafts no-offload max-silent-time= timeout= verbosity= rounds= cores= max-jobs=
complete -f -c guix -n '__fish_guix_needs_command' -a archive -d 'Export/import one or more packages from/to the store.'
complete -f -c guix -n '__fish_guix_using_command archive' -l export -d 'export the specified files/packages to stdout'
complete -f -c guix -n '__fish_guix_using_command archive' -a "--format=" -d 'export files/packages in the specified format FMT'
@@ -489,7 +489,7 @@ complete -f -c guix -n '__fish_guix_using_command archive' -l fallback -d 'fall
complete -f -c guix -n '__fish_guix_using_command archive' -l no-substitutes -d 'build instead of resorting to pre-built substitutes'
complete -f -c guix -n '__fish_guix_using_command archive' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
complete -f -c guix -n '__fish_guix_using_command archive' -l no-grafts -d 'do not graft packages'
-complete -f -c guix -n '__fish_guix_using_command archive' -l no-build-hook -d 'do not attempt to offload builds via the build hook'
+complete -f -c guix -n '__fish_guix_using_command archive' -l no-offload -d 'do not attempt to offload builds'
complete -f -c guix -n '__fish_guix_using_command archive' -a "--max-silent-time=" -d 'mark the build as failed after SECONDS of silence'
complete -f -c guix -n '__fish_guix_using_command archive' -a "--timeout=" -f -d 'mark the build as failed after SECONDS of activity'
complete -f -c guix -n '__fish_guix_using_command archive' -a "--verbosity=" -d 'use the given verbosity LEVEL'
@@ -498,7 +498,7 @@ complete -f -c guix -n '__fish_guix_using_command archive' -a "--cores=" -d 'all
complete -f -c guix -n '__fish_guix_using_command archive' -a "--max-jobs=" -d 'allow at most N build jobs'
#### pack
-set -l remotecommands --load-path= --keep-failed --keep-going --dry-run --fallback --no-substitutes --substitute-urls= --no-grafts --no-build-hook --max-silent-time= --timeout= --verbosity= --rounds= --cores= --max-jobs= --with-source= --with-input= --with-graft= --format= --expression= --system= --target= --compression= --symlink= --localstatedir --help --version
+set -l remotecommands --load-path= --keep-failed --keep-going --dry-run --fallback --no-substitutes --substitute-urls= --no-grafts --no-offload --max-silent-time= --timeout= --verbosity= --rounds= --cores= --max-jobs= --with-source= --with-input= --with-graft= --format= --expression= --system= --target= --compression= --symlink= --localstatedir --help --version
complete -f -c guix -n '__fish_guix_needs_command' -a pack -d 'Create a bundle of PACKAGE.'
complete -f -c guix -n '__fish_guix_using_command pack' -a "--load-path=" -d 'prepend DIR to the package module search path'
complete -f -c guix -n '__fish_guix_using_command pack' -s L -d 'prepend DIR to the package module search path'
@@ -512,7 +512,7 @@ complete -f -c guix -n '__fish_guix_using_command pack' -a "--fallback" -d 'fall
complete -f -c guix -n '__fish_guix_using_command pack' -a "--no-substitutes" -d 'build instead of resorting to pre-built substitutes'
complete -f -c guix -n '__fish_guix_using_command pack' -a "--substitute-urls=" -d 'fetch substitute from URLS if they are authorized'
complete -f -c guix -n '__fish_guix_using_command pack' -a "--no-grafts" -d 'do not graft packages'
-complete -f -c guix -n '__fish_guix_using_command pack' -a "--no-build-hook" -d 'do not attempt to offload builds via the build hook'
+complete -f -c guix -n '__fish_guix_using_command pack' -a "--no-offload" -d 'do not attempt to offload builds via the build hook'
complete -f -c guix -n '__fish_guix_using_command pack' -a "--max-silent-time=" -d 'mark the build as failed after SECONDS of silence'
complete -f -c guix -n '__fish_guix_using_command pack' -a "--timeout=" -d 'mark the build as failed after SECONDS of activity'
complete -f -c guix -n '__fish_guix_using_command pack' -a "--verbosity=" -d 'use the given verbosity LEVEL'
diff --git a/etc/completion/zsh/_guix b/etc/completion/zsh/_guix
index 3760bb629b..ae93b62b1d 100644
--- a/etc/completion/zsh/_guix
+++ b/etc/completion/zsh/_guix
@@ -87,7 +87,7 @@ _guix_list_installed_packages()
'--no-substitutes[build instead of resorting to pre-built substitutes]' \
'--substitute-urls=[fetch substitute from URLS if they are authorized]:URLS:_urls' \
'--no-grafts[do not graft packages]' \
- '--no-build-hook[do not attempt to offload builds via the build hook]' \
+ '--no-offload[do not attempt to offload builds]' \
'--max-silent-time=[mark the build as failed aft
This message was truncated. Download the full message here.
L
L
Ludovic Courtès wrote on 21 Nov 2019 16:03
[PATCH 2/3] Use 'offload?' instead of 'build-hook?' internally.
(address . 38312@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20191121150358.21044-1-ludo@gnu.org
* guix/scripts/archive.scm (%default-options): Replace 'build-hook?'
with 'offload?'.
* guix/scripts/build.scm (set-build-options-from-command-line): Pass
#:offload? instead of #:use-build-hook?.
(%standard-build-options): Use the 'offload? key instead of 'build-hook?.
(%default-options): Replace 'build-hook?' with 'offload?'.
* guix/scripts/copy.scm (%default-options): Likewise.
* guix/scripts/deploy.scm (%default-options): Likewise.
* guix/scripts/environment.scm (%default-options): Likewise.
* guix/scripts/pack.scm (%default-options): Likewise.
* guix/scripts/package.scm (%default-options): Likewise.
* guix/scripts/pull.scm (%default-options): Likewise.
* guix/scripts/system.scm (%default-options): Likewise.
* guix/scripts/time-machine.scm (%default-options): Likewise.
* guix/store.scm (set-build-options): Have #:use-build-hook? default
to *unspecified*. Add #:offload?. Add call to 'warn-about-deprecation'
when #:use-build-hook? is specified.
---
guix/scripts/archive.scm | 2 +-
guix/scripts/build.scm | 8 ++++----
guix/scripts/copy.scm | 2 +-
guix/scripts/deploy.scm | 2 +-
guix/scripts/environment.scm | 2 +-
guix/scripts/pack.scm | 2 +-
guix/scripts/package.scm | 2 +-
guix/scripts/pull.scm | 2 +-
guix/scripts/system.scm | 2 +-
guix/scripts/time-machine.scm | 2 +-
guix/store.scm | 11 +++++++++--
11 files changed, 22 insertions(+), 15 deletions(-)

Toggle diff (188 lines)
diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm
index fba0f73826..3318ef0889 100644
--- a/guix/scripts/archive.scm
+++ b/guix/scripts/archive.scm
@@ -55,7 +55,7 @@
;; Alist of default option values.
`((system . ,(%current-system))
(substitutes? . #t)
- (build-hook? . #t)
+ (offload? . #t)
(graft? . #t)
(print-build-trace? . #t)
(print-extended-build-trace? . #t)
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index e72b89d2d4..acb495a462 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -545,7 +545,7 @@ talking to a remote daemon\n")))
#:fallback? (assoc-ref opts 'fallback?)
#:use-substitutes? (assoc-ref opts 'substitutes?)
#:substitute-urls (assoc-ref opts 'substitute-urls)
- #:use-build-hook? (assoc-ref opts 'build-hook?)
+ #:offload? (assoc-ref opts 'offload?)
#:max-silent-time (assoc-ref opts 'max-silent-time)
#:timeout (assoc-ref opts 'timeout)
#:print-build-trace (assoc-ref opts 'print-build-trace?)
@@ -617,8 +617,8 @@ talking to a remote daemon\n")))
use '--no-offload' instead~%")))
(apply values
- (alist-cons 'build-hook? #f
- (alist-delete 'build-hook? result))
+ (alist-cons 'offload? #f
+ (alist-delete 'offload? result))
rest)))
(option '("max-silent-time") #t #f
(lambda (opt name arg result . rest)
@@ -663,7 +663,7 @@ use '--no-offload' instead~%")))
`((build-mode . ,(build-mode normal))
(graft? . #t)
(substitutes? . #t)
- (build-hook? . #t)
+ (offload? . #t)
(print-build-trace? . #t)
(print-extended-build-trace? . #t)
(multiplexed-build-output? . #t)
diff --git a/guix/scripts/copy.scm b/guix/scripts/copy.scm
index ce70f2f0b3..664cb32b7c 100644
--- a/guix/scripts/copy.scm
+++ b/guix/scripts/copy.scm
@@ -158,7 +158,7 @@ Copy ITEMS to or from the specified host over SSH.\n"))
(define %default-options
`((system . ,(%current-system))
(substitutes? . #t)
- (build-hook? . #t)
+ (offload? . #t)
(graft? . #t)
(print-build-trace? . #t)
(print-extended-build-trace? . #t)
diff --git a/guix/scripts/deploy.scm b/guix/scripts/deploy.scm
index 27b7e4fd1c..bc0ceabd3f 100644
--- a/guix/scripts/deploy.scm
+++ b/guix/scripts/deploy.scm
@@ -84,7 +84,7 @@ Perform the deployment specified by FILE.\n"))
(debug . 0)
(graft? . #t)
(substitutes? . #t)
- (build-hook? . #t)
+ (offload? . #t)
(print-build-trace? . #t)
(print-extended-build-trace? . #t)
(multiplexed-build-output? . #t)))
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index d78ca0f303..f04363750e 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -191,7 +191,7 @@ COMMAND or an interactive shell in that environment.\n"))
(define %default-options
`((system . ,(%current-system))
(substitutes? . #t)
- (build-hook? . #t)
+ (offload? . #t)
(graft? . #t)
(print-build-trace? . #t)
(print-extended-build-trace? . #t)
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index 89b3e389fc..5c46e7f83f 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -759,7 +759,7 @@ last resort for relocation."
(profile-name . "guix-profile")
(system . ,(%current-system))
(substitutes? . #t)
- (build-hook? . #t)
+ (offload? . #t)
(graft? . #t)
(print-build-trace? . #t)
(print-extended-build-trace? . #t)
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm
index bcd03a1df9..571e0099c3 100644
--- a/guix/scripts/package.scm
+++ b/guix/scripts/package.scm
@@ -318,7 +318,7 @@ Alternately, see @command{guix package --search-paths -p ~s}.")
(debug . 0)
(graft? . #t)
(substitutes? . #t)
- (build-hook? . #t)
+ (offload? . #t)
(print-build-trace? . #t)
(print-extended-build-trace? . #t)
(multiplexed-build-output? . #t)))
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm
index ef8d5c8fd9..a74776bd7b 100644
--- a/guix/scripts/pull.scm
+++ b/guix/scripts/pull.scm
@@ -71,7 +71,7 @@
;; Alist of default option values.
`((system . ,(%current-system))
(substitutes? . #t)
- (build-hook? . #t)
+ (offload? . #t)
(print-build-trace? . #t)
(print-extended-build-trace? . #t)
(multiplexed-build-output? . #t)
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 27b014db68..e49c9d36b9 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -1013,7 +1013,7 @@ Some ACTIONS support additional ARGS.\n"))
;; Alist of default option values.
`((system . ,(%current-system))
(substitutes? . #t)
- (build-hook? . #t)
+ (offload? . #t)
(print-build-trace? . #t)
(print-extended-build-trace? . #t)
(multiplexed-build-output? . #t)
diff --git a/guix/scripts/time-machine.scm b/guix/scripts/time-machine.scm
index 19e635555a..1e800e160f 100644
--- a/guix/scripts/time-machine.scm
+++ b/guix/scripts/time-machine.scm
@@ -94,7 +94,7 @@ Execute COMMAND ARGS... in an older version of Guix.\n"))
;; Alist of default option values.
`((system . ,(%current-system))
(substitutes? . #t)
- (build-hook? . #t)
+ (offload? . #t)
(print-build-trace? . #t)
(print-extended-build-trace? . #t)
(multiplexed-build-output? . #t)
diff --git a/guix/store.scm b/guix/store.scm
index a276554a52..cf25d347fc 100644
--- a/guix/store.scm
+++ b/guix/store.scm
@@ -763,7 +763,8 @@ encoding conversion errors."
max-build-jobs
timeout
max-silent-time
- (use-build-hook? #t)
+ (offload? #t)
+ (use-build-hook? *unspecified*) ;deprecated
(build-verbosity 0)
(log-type 0)
(print-build-trace #t)
@@ -803,6 +804,10 @@ encoding conversion errors."
(define socket
(store-connection-socket server))
+ (unless (unspecified? use-build-hook?)
+ (warn-about-deprecation #:use-build-hook? #f
+ #:replacement #:offload?))
+
(let-syntax ((send (syntax-rules ()
((_ (type option) ...)
(begin
@@ -816,7 +821,9 @@ encoding conversion errors."
(max-silent-time (or max-silent-time 3600)))
(send (integer max-build-jobs) (integer max-silent-time))))
(when (>= (store-connection-minor-version server) 2)
- (send (boolean use-build-hook?)))
+ (send (boolean (if (unspecified? use-build-hook?)
+ offload?
+ use-build-hook?))))
(when (>= (store-connection-minor-version server) 4)
(send (integer build-verbosity) (integer log-type)
(boolean print-build-trace)))
--
2.24.0
L
L
Ludovic Courtès wrote on 21 Nov 2019 16:03
[PATCH 3/3] guix build: '--keep-failed' implies '--no-offload'.
(address . 38312@debbugs.gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
20191121150358.21044-2-ludo@gnu.org
* guix/scripts/build.scm (set-build-options-from-command-line): Pass
#:offload? #f when 'keep-failed? is true.
* doc/guix.texi (Common Build Options): Document it.
---
doc/guix.texi | 6 +++---
guix/scripts/build.scm | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)

Toggle diff (33 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index b1c615235b..e57c12ab7f 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8048,9 +8048,9 @@ the end of the build log. This is useful when debugging build issues.
@xref{Debugging Build Failures}, for tips and tricks on how to debug
build issues.
-This option has no effect when connecting to a remote daemon with a
-@code{guix://} URI (@pxref{The Store, the @code{GUIX_DAEMON_SOCKET}
-variable}).
+This option implies @option{--no-offload}, and it has no effect when
+connecting to a remote daemon with a @code{guix://} URI (@pxref{The
+Store, the @code{GUIX_DAEMON_SOCKET} variable}).
@item --keep-going
@itemx -k
diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
index acb495a462..a853ac6c7d 100644
--- a/guix/scripts/build.scm
+++ b/guix/scripts/build.scm
@@ -545,7 +545,8 @@ talking to a remote daemon\n")))
#:fallback? (assoc-ref opts 'fallback?)
#:use-substitutes? (assoc-ref opts 'substitutes?)
#:substitute-urls (assoc-ref opts 'substitute-urls)
- #:offload? (assoc-ref opts 'offload?)
+ #:offload? (and (assoc-ref opts 'offload?)
+ (not (assoc-ref opts 'keep-failed?)))
#:max-silent-time (assoc-ref opts 'max-silent-time)
#:timeout (assoc-ref opts 'timeout)
#:print-build-trace (assoc-ref opts 'print-build-trace?)
--
2.24.0
C
C
Carl Dong wrote on 21 Nov 2019 17:54
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 38312@debbugs.gnu.org)
86FB364B-E8B7-4813-A7C8-AAB4A74B3EB2@carldong.me
Hi Ludovic!

Perhaps we should print a message to the user for better user visibility when this case gets triggered?

Cheers,
Carl Dong

Toggle quote (48 lines)
> On Nov 21, 2019, at 10:03 AM, Ludovic Courtès <ludo@gnu.org> wrote:
>
>
> * guix/scripts/build.scm (set-build-options-from-command-line): Pass
> #:offload? #f when 'keep-failed? is true.
> * doc/guix.texi (Common Build Options): Document it.
> ---
> doc/guix.texi | 6 +++---
> guix/scripts/build.scm | 3 ++-
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/doc/guix.texi b/doc/guix.texi
> index b1c615235b..e57c12ab7f 100644
> --- a/doc/guix.texi
> +++ b/doc/guix.texi
> @@ -8048,9 +8048,9 @@ the end of the build log. This is useful when debugging build issues.
> @xref{Debugging Build Failures}, for tips and tricks on how to debug
> build issues.
>
> -This option has no effect when connecting to a remote daemon with a
> -@code{guix://} URI (@pxref{The Store, the @code{GUIX_DAEMON_SOCKET}
> -variable}).
> +This option implies @option{--no-offload}, and it has no effect when
> +connecting to a remote daemon with a @code{guix://} URI (@pxref{The
> +Store, the @code{GUIX_DAEMON_SOCKET} variable}).
>
> @item --keep-going
> @itemx -k
> diff --git a/guix/scripts/build.scm b/guix/scripts/build.scm
> index acb495a462..a853ac6c7d 100644
> --- a/guix/scripts/build.scm
> +++ b/guix/scripts/build.scm
> @@ -545,7 +545,8 @@ talking to a remote daemon\n")))
> #:fallback? (assoc-ref opts 'fallback?)
> #:use-substitutes? (assoc-ref opts 'substitutes?)
> #:substitute-urls (assoc-ref opts 'substitute-urls)
> - #:offload? (assoc-ref opts 'offload?)
> + #:offload? (and (assoc-ref opts 'offload?)
> + (not (assoc-ref opts 'keep-failed?)))
> #:max-silent-time (assoc-ref opts 'max-silent-time)
> #:timeout (assoc-ref opts 'timeout)
> #:print-build-trace (assoc-ref opts 'print-build-trace?)
> --
> 2.24.0
>
>
>
>
L
L
Ludovic Courtès wrote on 21 Nov 2019 19:26
(name . Carl Dong)(address . contact@carldong.me)(address . 38312@debbugs.gnu.org)
877e3tozlz.fsf@gnu.org
Hi Carl,

Carl Dong <contact@carldong.me> skribis:

Toggle quote (2 lines)
> Perhaps we should print a message to the user for better user visibility when this case gets triggered?

Yeah, I wondered: it seemed to me that people using -K would always use
it together with --no-build-hook, so it should come as no surprise.

Also, since offloading is the default, the warning would always be
printed when using -K, which is not so great.

Thoughts?

Ludo’.
L
L
Ludovic Courtès wrote on 26 Nov 2019 00:19
(name . Carl Dong)(address . contact@carldong.me)(address . 38312-done@debbugs.gnu.org)
87eexvtuhg.fsf@gnu.org
Hello,

I went ahead and pushed these patches:

2ce08a5d79 guix build: '--keep-failed' implies '--no-offload'.
7f44ab48f9 Use 'offload?' instead of 'build-hook?' internally.
dc209d5a5d guix build, daemon: Rename "--no-build-hook" to "--no-offload".

Let me know if you can think of ways we can make the --no-offload effect
more visible.

Thanks,
Ludo’.
Closed
?