summaryrefslogtreecommitdiff
path: root/guix/inferior.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-08-09 17:37:54 +0200
committerLudovic Courtès <ludo@gnu.org>2021-08-09 18:14:37 +0200
commit7bd5f72918556359e502fee73e8a7b0e725b901f (patch)
treeaf4f2b474f2c107ff1bc7660a6ccd24a97b444d2 /guix/inferior.scm
parent27f00963d31636eb94bb7f331989827f4782de78 (diff)
inferior: 'cached-channel-instance' no longer calls 'show-what-to-build'.
This allows the user of 'cached-channel-instance' to install the build handler of its choice. In particular, it allows "guix time-machine" to install a build notifier with the right options instead of using the defaults that 'cached-channel-instance' would pass to 'show-what-to-build*'. * guix/inferior.scm (cached-channel-instance): Remove call to 'show-what-to-build*'. (inferior-for-channels): Wrap body in 'with-build-handler'. * guix/scripts/time-machine.scm (guix-time-machine): Use 'with-build-handler'.
Diffstat (limited to 'guix/inferior.scm')
-rw-r--r--guix/inferior.scm18
1 files changed, 12 insertions, 6 deletions
diff --git a/guix/inferior.scm b/guix/inferior.scm
index 7c8e478f2a..81958baaa5 100644
--- a/guix/inferior.scm
+++ b/guix/inferior.scm
@@ -48,7 +48,7 @@
#:use-module (gcrypt hash)
#:autoload (guix cache) (maybe-remove-expired-cache-entries
file-expiration-time)
- #:autoload (guix ui) (show-what-to-build*)
+ #:autoload (guix ui) (build-notifier)
#:autoload (guix build utils) (mkdir-p)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
@@ -801,8 +801,10 @@ determines whether CHANNELS are authenticated."
(profile
(channel-instances->derivation instances)))
(mbegin %store-monad
- (show-what-to-build* (list profile))
+ ;; It's up to the caller to install a build handler to report
+ ;; what's going to be built.
(built-derivations (list profile))
+
;; Note: Caching is fine even when AUTHENTICATE? is false because
;; we always call 'latest-channel-instances?'.
(symlink* (derivation->output-path profile) cached)
@@ -821,10 +823,14 @@ This is a convenience procedure that people may use in manifests passed to
'guix package -m', for instance."
(define cached
(with-store store
- (cached-channel-instance store
- channels
- #:cache-directory cache-directory
- #:ttl ttl)))
+ ;; XXX: Install a build notifier out of convenience, so users know
+ ;; what's going on. However, we cannot be sure that its options, such
+ ;; as #:use-substitutes?, correspond to the daemon's default settings.
+ (with-build-handler (build-notifier)
+ (cached-channel-instance store
+ channels
+ #:cache-directory cache-directory
+ #:ttl ttl))))
(open-inferior cached))
;;; Local Variables: