build-self: Silent Guile warnings while computing the derivation.
authorLudovic Courtès <ludo@gnu.org>
Fri, 19 Mar 2021 20:33:37 +0000 (21:33 +0100)
committerLudovic Courtès <ludo@gnu.org>
Fri, 19 Mar 2021 20:44:36 +0000 (21:44 +0100)
In particular, silence the Guile-Git autoload warnings introduced by
c1940fde43c7aca37d67589cc5cb248086d17d56.

* build-aux/build-self.scm (build-program): Wrap 'guix-derivation' call
in 'parameterize'.

build-aux/build-self.scm

index 6a3b9c8..dd845d1 100644 (file)
@@ -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))))