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

Previous Next

Package: guix-patches;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43121 in the body.
You can then email your comments to 43121 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#43121; Package guix-patches. (Sun, 30 Aug 2020 21:07:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robin Green <greenrd <at> greenrd.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 30 Aug 2020 21:07:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Robin Green <greenrd <at> greenrd.org>
To: guix-patches <at> gnu.org
Cc: Robin Green <greenrd <at> greenrd.org>
Subject: [PATCH] guix: packages: Fix print-content-hash
Date: Sun, 30 Aug 2020 22:05:59 +0100
* 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





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 31 Aug 2020 13:54:01 GMT) Full text and rfc822 format available.

Notification sent to Robin Green <greenrd <at> greenrd.org>:
bug acknowledged by developer. (Mon, 31 Aug 2020 13:54:01 GMT) Full text and rfc822 format available.

Message #10 received at 43121-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Robin Green <greenrd <at> greenrd.org>
Cc: 43121-done <at> debbugs.gnu.org
Subject: Re: [bug#43121] [PATCH] guix: packages: Fix print-content-hash
Date: Mon, 31 Aug 2020 15:53:26 +0200
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’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 29 Sep 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 209 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.