GNU bug report logs -
#43121
[PATCH] guix: packages: Fix print-content-hash
Previous Next
Reported by: Robin Green <greenrd <at> greenrd.org>
Date: Sun, 30 Aug 2020 21:07:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#43121: [PATCH] guix: packages: Fix print-content-hash
which was filed against the guix-patches package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 43121 <at> debbugs.gnu.org.
--
43121: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43121
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Hi Robin,
Robin Green <greenrd <at> 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’.
[Message part 3 (message/rfc822, inline)]
* 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
This bug report was last modified 4 years and 324 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.