guix-patches
[Top][All Lists]
Advanced

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

bug#43121: [PATCH] guix: packages: Fix print-content-hash


From: Ludovic Courtès
Subject: bug#43121: [PATCH] guix: packages: Fix print-content-hash
Date: Mon, 31 Aug 2020 15:53:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Robin,

Robin Green <greenrd@greenrd.org> skribis:

> * guix/packages.scm (print-content-hash): Prevent throwing an exception for
> linux-libre and breaking backtraces.
> ---
>  guix/packages.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/guix/packages.scm b/guix/packages.scm
> index 95d7c2cc0d..c5a971b7b7 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))))
> +          (false-if-exception
> +           (bytevector->nix-base32-string (content-hash-value hash)))))
>  
>  (set-record-type-printer! <content-hash> print-content-hash)

I pushed something different with the same effect as
83ec969cc7170634872d4ff3ffc0d4099a6765a4 (avoiding ‘false-if-exception’,
which is too broad IMO).

Thanks!

Ludo’.





reply via email to

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