aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-01-28 22:42:48 +0100
committerLudovic Courtès <ludo@gnu.org>2019-01-28 23:13:40 +0100
commit3a8c4860fbccc840b28227dbe44cfffb128a91e0 (patch)
tree613aa330f46f735a50d3dbac0b50932a0c603149
parentea6fb108f6a3a53d48ea187b1f82b5f7ffce00a7 (diff)
downloadguix-3a8c4860fbccc840b28227dbe44cfffb128a91e0.tar
guix-3a8c4860fbccc840b28227dbe44cfffb128a91e0.tar.gz
channels: Turn off deprecation warnings when loading 'build-self.scm'.
* guix/channels.scm (build-from-source): Parameterize DEPRECATION-WARNING-PORT when loading SCRIPT.
-rw-r--r--guix/channels.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/guix/channels.scm b/guix/channels.scm
index 10345c1ce5..f386d18b74 100644
--- a/guix/channels.scm
+++ b/guix/channels.scm
@@ -27,6 +27,7 @@
#:use-module (guix profiles)
#:use-module (guix derivations)
#:use-module (guix combinators)
+ #:use-module (guix deprecation)
#:use-module (guix store)
#:use-module (guix i18n)
#:use-module ((guix utils)
@@ -275,7 +276,12 @@ package modules under SOURCE using CORE, an instance of Guix."
(if (file-exists? script)
(let ((build (save-module-excursion
(lambda ()
- (primitive-load script)))))
+ ;; Disable deprecation warnings; it's OK for SCRIPT to
+ ;; use deprecated APIs and the user doesn't have to know
+ ;; about it.
+ (parameterize ((deprecation-warning-port
+ (%make-void-port "w")))
+ (primitive-load script))))))
;; BUILD must be a monadic procedure of at least one argument: the
;; source tree.
;;