From: "Ludovic Courtès" <ludo@gnu.org>
To: Helio Machado <0x2b3bfa0@gmail.com>
Cc: 44038-done@debbugs.gnu.org
Subject: bug#44038: [PATCH] Fix deprecation warning for origin-sha256
Date: Mon, 19 Oct 2020 10:57:21 +0200 [thread overview]
Message-ID: <87k0vm1tla.fsf@gnu.org> (raw)
In-Reply-To: <CANe01w6ujivzD8xgP_7banGyz+dLVSmU==cejA3xVeTePQ-1Bg@mail.gmail.com> (Helio Machado's message of "Mon, 19 Oct 2020 00:25:34 +0200")
[-- Attachment #1: Type: text/plain, Size: 575 bytes --]
Hi,
Helio Machado <0x2b3bfa0@gmail.com> skribis:
> From 31c8a3ee7e6819ca01c875cfefd2818f727bc32e Mon Sep 17 00:00:00 2001
> From: Helio Machado <0x2b3bfa0+git@googlemail.com>
> Date: Mon, 19 Oct 2020 00:15:00 +0200
> Subject: [PATCH] guix/import: Fix deprecation warning for origin-sha256
>
> * guix/import/print.scm (source->code source version): Replace
> origin-sha256 by origin-hash
The non-SHA256 case would let the raw <content-hash> record through, so
I amended it as follows (also removing an unnecessary ‘format’ call).
Thanks!
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1067 bytes --]
diff --git a/guix/import/print.scm b/guix/import/print.scm
index e79f831c76..d21ce57aeb 100644
--- a/guix/import/print.scm
+++ b/guix/import/print.scm
@@ -83,9 +83,11 @@ when evaluated."
((? string? uri) (list uri))
(factorized factorized))))
,(if (equal? (content-hash-algorithm hash) 'sha256)
- `(sha256 (base32 ,(format #f "~a" (bytevector->nix-base32-string
- (content-hash-value hash)))))
- `(hash ,hash))
+ `(sha256 (base32 ,(bytevector->nix-base32-string
+ (content-hash-value hash))))
+ `(hash (content-hash ,(bytevector->nix-base32-string
+ (content-hash-value hash))
+ ,(content-hash-algorithm hash))))
;; FIXME: in order to be able to throw away the directory prefix,
;; we just assume that the patch files can be found with
;; "search-patches".
prev parent reply other threads:[~2020-10-19 8:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 16:14 [bug#44038] [PATCH] Fix deprecation warning for origin-sha256 Helio Machado
2020-10-17 20:21 ` Ludovic Courtès
2020-10-18 22:25 ` Helio Machado
2020-10-19 8:57 ` Ludovic Courtès [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0vm1tla.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=0x2b3bfa0@gmail.com \
--cc=44038-done@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).