[PATCH] guix: print: Update deprecated method

  • Done
  • quality assurance status badge
Details
2 participants
  • Ekaitz Zarraga
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ekaitz Zarraga
Severity
normal

Debbugs page

Ekaitz Zarraga wrote 5 years ago
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
qx5ILa32awS_GSGud25AiGYgZTOocdUMh_R6IpH5JVjF6egmzxPsgXzV3xIjicdLNNlQxRjWP4dcgF4XsDyVj01te676-vhw_PCtVWF4mYs=@elenq.tech
Hi,

This patch corrects the following warning:

guix/import/print.scm:77:21: warning: 'origin-sha256' is deprecated, use 'origin-hash' instead


Best,
Ekaitz




From ac21251092570bd426505f98d4415781e7c66147 Mon Sep 17 00:00:00 2001
From: Ekaitz Zarraga <ekaitz@elenq.tech>
Date: Sun, 24 May 2020 18:36:59 +0200
Subject: [PATCH] guix: print: Update deprecated method

* guix/import/print.scm (source->code): Replace origin-sha256 with
origin-hash
---
guix/import/print.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (13 lines)
diff --git a/guix/import/print.scm b/guix/import/print.scm
index 11cc218285..afbb680607 100644
--- a/guix/import/print.scm
+++ b/guix/import/print.scm
@@ -74,7 +74,7 @@ when evaluated."
(define (source->code source version)
(let ((uri (origin-uri source))
(method (origin-method source))
- (sha256 (origin-sha256 source))
+ (sha256 (origin-hash source))
(file-name (origin-file-name source))
(patches (origin-patches source)))
`(origin
--
2.26.2
Ludovic Courtès wrote 5 years ago
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(address . 41510@debbugs.gnu.org)
87eer1tskr.fsf@gnu.org
Hi,

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (2 lines)
> guix/import/print.scm:77:21: warning: 'origin-sha256' is deprecated, use 'origin-hash' instead

[...]

Toggle quote (3 lines)
> - (sha256 (origin-sha256 source))
> + (sha256 (origin-hash source))

This is quite correct (contrary to what the warning suggests). You also
have to use ‘content-hash-value’. The code also needs to check whether
it’s actually sha256 or some other algorithm.

Make sure to run:

make check TESTS=tests/print.scm

afterwards!

Thanks,
Ludo’.
Ekaitz Zarraga wrote 5 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)(name . 41510@debbugs.gnu.org)(address . 41510@debbugs.gnu.org)
L8urT0ZiySdxrZ0C-Akgm8Smcy_BZhzqzq9x0HD21ZChb-BPOl5nVGY6LbK_0jcOtL0BgoasBWjIgEqRHzucrHaN2RxhNX2E4qR8GiFf5kc=@elenq.tech
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Saturday, May 30, 2020 4:17 PM, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (29 lines)
> Hi,
>
> Ekaitz Zarraga ekaitz@elenq.tech skribis:
>
> > guix/import/print.scm:77:21: warning: 'origin-sha256' is deprecated, use 'origin-hash' instead
>
> [...]
>
> > - (sha256 (origin-sha256 source))
> >
> >
> >
> > - (sha256 (origin-hash source))
> >
> >
>
> This is quite correct (contrary to what the warning suggests). You also
> have to use ‘content-hash-value’. The code also needs to check whether
> it’s actually sha256 or some other algorithm.
>
> Make sure to run:
>
> make check TESTS=tests/print.scm
>
> afterwards!
>
> Thanks,
> Ludo’.

LOL

Time to fix the warning then? ;)
Ludovic Courtès wrote 4 years ago
(name . Ekaitz Zarraga)(address . ekaitz@elenq.tech)(address . 41510-done@debbugs.gnu.org)
875z5d26aa.fsf@gnu.org
Hi,

Ekaitz Zarraga <ekaitz@elenq.tech> skribis:

Toggle quote (4 lines)
> This patch corrects the following warning:
>
> guix/import/print.scm:77:21: warning: 'origin-sha256' is deprecated, use 'origin-hash' instead

This was fixed in a9105c2c4c97ffbdb1b09dadc14773566924ab59.

Closing!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 41510@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 41510
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help