aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-08-31 12:24:21 +0200
committerLudovic Courtès <ludo@gnu.org>2020-08-31 15:50:35 +0200
commit83ec969cc7170634872d4ff3ffc0d4099a6765a4 (patch)
tree6332c89037e525896b9f2e06bedc37d98c584a28
parentb03267df6d5ec44e9617b6aab0df14a2e79f822e (diff)
downloadguix-83ec969cc7170634872d4ff3ffc0d4099a6765a4.tar.gz
guix-83ec969cc7170634872d4ff3ffc0d4099a6765a4.zip
packages: <content-hash> printer gracefully handle #f values.
Suggested by Robin Green <greenrd@greenrd.org>. * guix/packages.scm (print-content-hash): Gracefully deal with cases with 'content-hash-value' returns #f, as is the case for 'linux-libre'.
-rw-r--r--guix/packages.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 95d7c2cc0d..6598bd3149 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -228,7 +228,8 @@ as base32. Otherwise, it must be a bytevector."
(define (print-content-hash hash port)
(format port "#<content-hash ~a:~a>"
(content-hash-algorithm hash)
- (bytevector->nix-base32-string (content-hash-value hash))))
+ (and=> (content-hash-value hash)
+ bytevector->nix-base32-string)))
(set-record-type-printer! <content-hash> print-content-hash)