unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#43121] [PATCH] guix: packages: Fix print-content-hash
@ 2020-08-30 21:05 Robin Green
  2020-08-31 13:53 ` bug#43121: " Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Robin Green @ 2020-08-30 21:05 UTC (permalink / raw)
  To: 43121; +Cc: Robin Green

* 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)
 
-- 
2.27.0





^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#43121: [PATCH] guix: packages: Fix print-content-hash
  2020-08-30 21:05 [bug#43121] [PATCH] guix: packages: Fix print-content-hash Robin Green
@ 2020-08-31 13:53 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2020-08-31 13:53 UTC (permalink / raw)
  To: Robin Green; +Cc: 43121-done

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’.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-31 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-30 21:05 [bug#43121] [PATCH] guix: packages: Fix print-content-hash Robin Green
2020-08-31 13:53 ` bug#43121: " Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).