emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44038: closed ([PATCH] Fix deprecation warning for origin-sha256)


From: GNU bug Tracking System
Subject: bug#44038: closed ([PATCH] Fix deprecation warning for origin-sha256)
Date: Mon, 19 Oct 2020 08:58:03 +0000

Your message dated Mon, 19 Oct 2020 10:57:21 +0200
with message-id <87k0vm1tla.fsf@gnu.org>
and subject line Re: [bug#44038] [PATCH] Fix deprecation warning for 
origin-sha256
has caused the debbugs.gnu.org bug report #44038,
regarding [PATCH] Fix deprecation warning for origin-sha256
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
44038: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=44038
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] Fix deprecation warning for origin-sha256 Date: Fri, 16 Oct 2020 18:14:29 +0200
This patch fixes the following build-time deprecation warning:

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

Attachment: 0001-guix-import-Fix-deprecation-warning-for-origin-sha25.patch
Description: Binary data


--- End Message ---
--- Begin Message --- Subject: Re: [bug#44038] [PATCH] Fix deprecation warning for origin-sha256 Date: Mon, 19 Oct 2020 10:57:21 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
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’.

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

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]