summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-04-16 16:13:34 +0200
committerLudovic Courtès <ludo@gnu.org>2022-05-01 21:30:34 +0200
commiteaebc7f2b715093baf0d4a8c86d7e1a6af20ebc8 (patch)
treefd7313583dc613b99f7ac9ce3ff52b5792d7eb9b
parent774f8804bafbf42a65eca492d1395da57deeb467 (diff)
downloadguix-patches-eaebc7f2b715093baf0d4a8c86d7e1a6af20ebc8.tar
guix-patches-eaebc7f2b715093baf0d4a8c86d7e1a6af20ebc8.tar.gz
file-systems: Avoid load-time warnings when attempting to load (guix store).
This makes sure warnings like "incompatible bytecode version" don't go through when looking for (guix store). * gnu/system/file-systems.scm (%store-prefix): Parameterize 'current-warning-port' around 'resolve-module' call.
-rw-r--r--gnu/system/file-systems.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 437f8da898..f8f4276283 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013-2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020 Google LLC
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
@@ -272,7 +272,8 @@ flags are found."
;; Note: If we have (guix store database) in the search path and we do *not*
;; have (guix store) proper, 'resolve-module' returns an empty (guix store)
;; with one sub-module.
- (cond ((and=> (resolve-module '(guix store) #:ensure #f)
+ (cond ((and=> (parameterize ((current-warning-port (%make-void-port "w0")))
+ (resolve-module '(guix store) #:ensure #f))
(lambda (store)
(module-variable store '%store-prefix)))
=>