summary refs log tree commit diff
path: root/build-aux/build-self.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-03-19 21:33:37 +0100
committerLudovic Courtès <ludo@gnu.org>2021-03-19 21:44:36 +0100
commitef2b9322fae1d03bf639924d12214b0f58c11054 (patch)
tree600a03bc1522cba1e280a9fb50bbf270df404359 /build-aux/build-self.scm
parentb93d7daeaffd59436b3cf52a777d2cbe052c14d9 (diff)
downloadguix-ef2b9322fae1d03bf639924d12214b0f58c11054.tar.gz
build-self: Silent Guile warnings while computing the derivation.
In particular, silence the Guile-Git autoload warnings introduced by
c1940fde43c7aca37d67589cc5cb248086d17d56.

* build-aux/build-self.scm (build-program): Wrap 'guix-derivation' call
in 'parameterize'.
Diffstat (limited to 'build-aux/build-self.scm')
-rw-r--r--build-aux/build-self.scm19
1 files changed, 11 insertions, 8 deletions
diff --git a/build-aux/build-self.scm b/build-aux/build-self.scm
index 6a3b9c83d4..dd845d1596 100644
--- a/build-aux/build-self.scm
+++ b/build-aux/build-self.scm
@@ -356,14 +356,17 @@ interface (FFI) of Guile.")
 
                            (display
                             (and=>
-                             (run-with-store store
-                               (guix-derivation source version
-                                                #$guile-version
-                                                #:channel-metadata
-                                                '#$channel-metadata
-                                                #:pull-version
-                                                #$pull-version)
-                               #:system system)
+                             ;; Silence autoload warnings and the likes.
+                             (parameterize ((current-warning-port
+                                             (%make-void-port "w")))
+                               (run-with-store store
+                                 (guix-derivation source version
+                                                  #$guile-version
+                                                  #:channel-metadata
+                                                  '#$channel-metadata
+                                                  #:pull-version
+                                                  #$pull-version)
+                                 #:system system))
                              derivation-file-name))))))
                   #:module-path (list source))))