guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: download: Make (guix base16) a soft dependency.


From: guix-commits
Subject: 01/02: download: Make (guix base16) a soft dependency.
Date: Wed, 28 Nov 2018 16:26:30 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit a52ae1b6620fcef28e668047a51a6b2a9fb89e35
Author: Ludovic Courtès <address@hidden>
Date:   Wed Nov 28 22:17:39 2018 +0100

    download: Make (guix base16) a soft dependency.
    
    Fixes <https://bugs.gnu.org/33542>.
    Reported by Mark H Weaver <address@hidden>.
    
    * guix/download.scm (%content-addressed-mirrors): Autoload (guix base16).
---
 guix/download.scm | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/guix/download.scm b/guix/download.scm
index 0f92e12..7aebec4 100644
--- a/guix/download.scm
+++ b/guix/download.scm
@@ -373,7 +373,13 @@
   ;; procedure that takes a file name, an algorithm (symbol) and a hash
   ;; (bytevector), and returns a URL or #f.
   '(begin
-     (use-modules (guix base32) (guix base16))
+     (use-modules (guix base32))
+
+     ;; XXX: (guix base16) appeared in March 2017 (and thus 0.13.0) so old
+     ;; installations of the daemon might lack it.  Thus, load it lazily to
+     ;; avoid gratuitous errors.  See <https://bugs.gnu.org/33542>.
+     (module-autoload! (current-module)
+                       '(guix base16) '(bytevector->base16-string))
 
      (list (lambda (file algo hash)
              ;; Files served by 'guix publish' are accessible under a single



reply via email to

[Prev in Thread] Current Thread [Next in Thread]