GNU bug report logs - #44038
[PATCH] Fix deprecation warning for origin-sha256

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Helio Machado <0x2b3bfa0@HIDDEN>; Keywords: patch; Done: Ludovic Courtès <ludo@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 44038-done <at> debbugs.gnu.org:


Received: (at 44038-done) by debbugs.gnu.org; 19 Oct 2020 08:57:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 19 04:57:32 2020
Received: from localhost ([127.0.0.1]:39970 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kUQyy-0006Ib-BA
	for submit <at> debbugs.gnu.org; Mon, 19 Oct 2020 04:57:32 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33496)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kUQyw-0006IB-9b
 for 44038-done <at> debbugs.gnu.org; Mon, 19 Oct 2020 04:57:30 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58910)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1kUQyq-0004d8-DC; Mon, 19 Oct 2020 04:57:24 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=59050 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1kUQyp-0005wn-9o; Mon, 19 Oct 2020 04:57:23 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Helio Machado <0x2b3bfa0@HIDDEN>
Subject: Re: [bug#44038] [PATCH] Fix deprecation warning for origin-sha256
References: <CANe01w5vyRSF2ZqycmR2CukB_DXpJHYLQix-Ao+nAg5B=ECPWw@HIDDEN>
 <87y2k44n8m.fsf@HIDDEN>
 <CANe01w6ujivzD8xgP_7banGyz+dLVSmU==cejA3xVeTePQ-1Bg@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 28 =?utf-8?Q?Vend=C3=A9miaire?= an 229 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Mon, 19 Oct 2020 10:57:21 +0200
In-Reply-To: <CANe01w6ujivzD8xgP_7banGyz+dLVSmU==cejA3xVeTePQ-1Bg@HIDDEN>
 (Helio Machado's message of "Mon, 19 Oct 2020 00:25:34 +0200")
Message-ID: <87k0vm1tla.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 44038-done
Cc: 44038-done <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi,

Helio Machado <0x2b3bfa0@HIDDEN> skribis:

> From 31c8a3ee7e6819ca01c875cfefd2818f727bc32e Mon Sep 17 00:00:00 2001
> From: Helio Machado <0x2b3bfa0+git@HIDDEN>
> 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 =E2=80=98format=E2=80=
=99 call).

Thanks!

Ludo=E2=80=99.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline

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

--=-=-=--




Notification sent to Helio Machado <0x2b3bfa0@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Ludovic Courtès <ludo@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 44038 <at> debbugs.gnu.org:


Received: (at 44038) by debbugs.gnu.org; 18 Oct 2020 22:50:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 18 18:50:46 2020
Received: from localhost ([127.0.0.1]:39322 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kUHVl-0001Cd-O3
	for submit <at> debbugs.gnu.org; Sun, 18 Oct 2020 18:50:46 -0400
Received: from mail-qk1-f173.google.com ([209.85.222.173]:46296)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <0x2b3bfa0@HIDDEN>) id 1kUH84-0000bU-LE
 for 44038 <at> debbugs.gnu.org; Sun, 18 Oct 2020 18:26:16 -0400
Received: by mail-qk1-f173.google.com with SMTP id a23so6421044qkg.13
 for <44038 <at> debbugs.gnu.org>; Sun, 18 Oct 2020 15:26:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:sender:from:date:message-id
 :subject:to; bh=efi7kz6ek7vN/CnkmikGBervp1xROqmdCPpp1nCf/dw=;
 b=Lw5yr56pJFxmaZ1Smo3BgXlfEaQUy3LOYSlE6y8OrlhvBs4IFdxX25oyITYDrzL9Up
 lkVCHy2ZaF17xs+s9nOUwdc8jvVaaKfucYumitytLW8A6gWwiEVXEnaQtNddK/jFIT7P
 IVAvxe40u5Uh3oXrZUcyzycMnslAJwNDexhTxN0Bk3Mvz3A6Uw//gdHw8Po/NKb4Rb+i
 Irfl725ATViLjXM2xi1UDccp197ZpkPvoGNVUVTAKH3byEX/Yzei8qCyIfpEmBegsOpv
 b9n9Fbjmjh3fa5DeDHfBaqvLAaXxmpw5k8oM0gXXerlMZjYuSt8jayeMLq+mz3ch3si/
 AmUg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:sender:from
 :date:message-id:subject:to;
 bh=efi7kz6ek7vN/CnkmikGBervp1xROqmdCPpp1nCf/dw=;
 b=fjy3RPvygrgbKHlgZtg7qKQ4ZLqsCOQA7Ul6l9EquPQMJ9pmkYjJNwq3VRiim/iRtY
 QvakxlZmSchx8Wozad5dHqiTjzRzWLmbXskp6w1YGppuRkSGJylKgcTvMjcM52zhne++
 BIP4KlVkRlFzZOi9nk6GpD/BWFmvug2WLl+sh5PsDADxnC9rJnIci7GDXbA1akLsyxk9
 Q5t1jcCD8Zf2zHp3Cy6wQmYKLXNXv3m/w1XSk5ejIp1ZpJ0HNlSR4hzosECmSviXOd6M
 Ubeu/J2t+U96/iLqCHCniDW8hqkRJuPz/8Jy1P+otWwgnN8xqrzDCPgvrw/i5PnUOLlG
 8I0w==
X-Gm-Message-State: AOAM5308UG3ZbA73b5deVyRDJp61ON4p4RMF1Vp2gl6eIt+sSM/KN/Oj
 zfKMXd5NQSRJ588TwEGBZ5AeoTZcbS9WyESrMMc=
X-Google-Smtp-Source: ABdhPJwCh+PYpstpd0ko4tLKtSPPJXctnUrdU6NJjf4/Czi5Q0CupqG0vuOl3+Qjwmh65G5m7JEAP1oPr5U5bxAZSPI=
X-Received: by 2002:a37:9747:: with SMTP id z68mr13324044qkd.424.1603059970811; 
 Sun, 18 Oct 2020 15:26:10 -0700 (PDT)
MIME-Version: 1.0
References: <CANe01w5vyRSF2ZqycmR2CukB_DXpJHYLQix-Ao+nAg5B=ECPWw@HIDDEN>
 <87y2k44n8m.fsf@HIDDEN>
In-Reply-To: <87y2k44n8m.fsf@HIDDEN>
X-Google-Sender-Delegation: heliomachadomegias@HIDDEN
From: Helio Machado <0x2b3bfa0@HIDDEN>
Date: Mon, 19 Oct 2020 00:25:34 +0200
X-Google-Sender-Auth: aGfFzvtKCDp06la9dmDBskIDv9o
Message-ID: <CANe01w6ujivzD8xgP_7banGyz+dLVSmU==cejA3xVeTePQ-1Bg@HIDDEN>
Subject: Re: [bug#44038] [PATCH] Fix deprecation warning for origin-sha256
To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>, 44038 <at> debbugs.gnu.org
Content-Type: multipart/mixed; boundary="0000000000001dd3eb05b1f97cde"
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 44038
X-Mailman-Approved-At: Sun, 18 Oct 2020 18:50:44 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

--0000000000001dd3eb05b1f97cde
Content-Type: multipart/alternative; boundary="0000000000001dd3e405b1f97cdc"

--0000000000001dd3e405b1f97cdc
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello,

Sorry for the low-quality patch; it seemed so obvious that laziness won
over good sense.

The amended patch implements your suggestion and checks whether the used
hash is `sha256` or anything else, adapting the output accordingly in each
case.

Thank you for your patience,
Helio.

On Sat, 17 Oct 2020 at 22:21, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:

> Hi,
>
> Helio Machado <0x2b3bfa0@HIDDEN> skribis:
>
> > This patch fixes the following build-time deprecation warning:
> >
> >     guix/import/print.scm:77:21: warning: 'origin-sha256' is deprecated=
,
> > use 'origin-hash' instead
>
> Thanks for looking into it!  The deprecation warning is a bit confusing
> though in this case because =E2=80=98origin-hash=E2=80=99 is not exactly =
a drop-in
> replacement for =E2=80=98origin-sha256=E2=80=99, as can be seen in the ma=
nual, so this
> patch wouldn=E2=80=99t have the desired effect.
>
> Instead, =E2=80=98print.scm=E2=80=99 could be changed to emit a (sha256 =
=E2=80=A6) form when the
> <content-hash> object is indeed a sha256 hash, and otherwise use a (hash
> =E2=80=A6) form.
>
> See
> <
> https://guix.gnu.org/manual/devel/en/html_node/origin-Reference.html#inde=
x-content_002dhash
> >.
>
> Thanks,
> Ludo=E2=80=99.
>

--0000000000001dd3e405b1f97cdc
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hello,<div><br></div><div>Sorry for the low-quality patch;=
 it seemed so obvious that laziness won over good sense.</div><div><br></di=
v><div>The amended patch implements your suggestion and checks whether the =
used hash is `sha256` or anything else, adapting the output accordingly in =
each case.</div><div><br></div><div>Thank you for your patience,</div><div>=
Helio.=C2=A0</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" cla=
ss=3D"gmail_attr">On Sat, 17 Oct 2020 at 22:21, Ludovic Court=C3=A8s &lt;<a=
 href=3D"mailto:ludo@HIDDEN">ludo@HIDDEN</a>&gt; wrote:<br></div><blockqu=
ote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-wid=
th:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-l=
eft:1ex">Hi,<br>
<br>
Helio Machado &lt;<a href=3D"mailto:0x2b3bfa0@HIDDEN" target=3D"_blank">=
0x2b3bfa0@HIDDEN</a>&gt; skribis:<br>
<br>
&gt; This patch fixes the following build-time deprecation warning:<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0guix/import/print.scm:77:21: warning: &#39;origin-s=
ha256&#39; is deprecated,<br>
&gt; use &#39;origin-hash&#39; instead<br>
<br>
Thanks for looking into it!=C2=A0 The deprecation warning is a bit confusin=
g<br>
though in this case because =E2=80=98origin-hash=E2=80=99 is not exactly a =
drop-in<br>
replacement for =E2=80=98origin-sha256=E2=80=99, as can be seen in the manu=
al, so this<br>
patch wouldn=E2=80=99t have the desired effect.<br>
<br>
Instead, =E2=80=98print.scm=E2=80=99 could be changed to emit a (sha256 =E2=
=80=A6) form when the<br>
&lt;content-hash&gt; object is indeed a sha256 hash, and otherwise use a (h=
ash<br>
=E2=80=A6) form.<br>
<br>
See<br>
&lt;<a href=3D"https://guix.gnu.org/manual/devel/en/html_node/origin-Refere=
nce.html#index-content_002dhash" rel=3D"noreferrer" target=3D"_blank">https=
://guix.gnu.org/manual/devel/en/html_node/origin-Reference.html#index-conte=
nt_002dhash</a>&gt;.<br>
<br>
Thanks,<br>
Ludo=E2=80=99.<br>
</blockquote></div>

--0000000000001dd3e405b1f97cdc--

--0000000000001dd3eb05b1f97cde
Content-Type: application/octet-stream; 
	name="0001-guix-import-Fix-deprecation-warning-for-origin-sha25.patch"
Content-Disposition: attachment; 
	filename="0001-guix-import-Fix-deprecation-warning-for-origin-sha25.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_kgfo5xaa0>
X-Attachment-Id: f_kgfo5xaa0

RnJvbSAzMWM4YTNlZTdlNjgxOWNhMDFjODc1Y2ZlZmQyODE4ZjcyN2JjMzJlIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBIZWxpbyBNYWNoYWRvIDwweDJiM2JmYTArZ2l0QGdvb2dsZW1h
aWwuY29tPgpEYXRlOiBNb24sIDE5IE9jdCAyMDIwIDAwOjE1OjAwICswMjAwClN1YmplY3Q6IFtQ
QVRDSF0gZ3VpeC9pbXBvcnQ6IEZpeCBkZXByZWNhdGlvbiB3YXJuaW5nIGZvciBvcmlnaW4tc2hh
MjU2CgoqIGd1aXgvaW1wb3J0L3ByaW50LnNjbSAoc291cmNlLT5jb2RlIHNvdXJjZSB2ZXJzaW9u
KTogUmVwbGFjZQpvcmlnaW4tc2hhMjU2IGJ5IG9yaWdpbi1oYXNoCi0tLQogZ3VpeC9pbXBvcnQv
cHJpbnQuc2NtIHwgOSArKysrKy0tLS0KIDEgZmlsZSBjaGFuZ2VkLCA1IGluc2VydGlvbnMoKyks
IDQgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvZ3VpeC9pbXBvcnQvcHJpbnQuc2NtIGIvZ3Vp
eC9pbXBvcnQvcHJpbnQuc2NtCmluZGV4IDExY2MyMTgyODUuLmU3OWY4MzFjNzYgMTAwNjQ0Ci0t
LSBhL2d1aXgvaW1wb3J0L3ByaW50LnNjbQorKysgYi9ndWl4L2ltcG9ydC9wcmludC5zY20KQEAg
LTc0LDcgKzc0LDcgQEAgd2hlbiBldmFsdWF0ZWQuIgogICAoZGVmaW5lIChzb3VyY2UtPmNvZGUg
c291cmNlIHZlcnNpb24pCiAgICAgKGxldCAoKHVyaSAgICAgICAob3JpZ2luLXVyaSBzb3VyY2Up
KQogICAgICAgICAgIChtZXRob2QgICAgKG9yaWdpbi1tZXRob2Qgc291cmNlKSkKLSAgICAgICAg
ICAoc2hhMjU2ICAgIChvcmlnaW4tc2hhMjU2IHNvdXJjZSkpCisgICAgICAgICAgKGhhc2ggICAg
ICAob3JpZ2luLWhhc2ggc291cmNlKSkKICAgICAgICAgICAoZmlsZS1uYW1lIChvcmlnaW4tZmls
ZS1uYW1lIHNvdXJjZSkpCiAgICAgICAgICAgKHBhdGNoZXMgICAob3JpZ2luLXBhdGNoZXMgc291
cmNlKSkpCiAgICAgICBgKG9yaWdpbgpAQCAtODIsOSArODIsMTAgQEAgd2hlbiBldmFsdWF0ZWQu
IgogICAgICAgICAgKHVyaSAoc3RyaW5nLWFwcGVuZCAsQChtYXRjaCAoZmFjdG9yaXplLXVyaSB1
cmkgdmVyc2lvbikKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoPyBzdHJpbmc/
IHVyaSkgKGxpc3QgdXJpKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmYWN0
b3JpemVkIGZhY3Rvcml6ZWQpKSkpCi0gICAgICAgICAoc2hhMjU2Ci0gICAgICAgICAgKGJhc2Uz
MgotICAgICAgICAgICAsKGZvcm1hdCAjZiAifmEiIChieXRldmVjdG9yLT5uaXgtYmFzZTMyLXN0
cmluZyBzaGEyNTYpKSkpCisgICAgICAgICAsKGlmIChlcXVhbD8gKGNvbnRlbnQtaGFzaC1hbGdv
cml0aG0gaGFzaCkgJ3NoYTI1NikKKyAgICAgICAgICAgICAgYChzaGEyNTYgKGJhc2UzMiAsKGZv
cm1hdCAjZiAifmEiIChieXRldmVjdG9yLT5uaXgtYmFzZTMyLXN0cmluZworICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjb250ZW50LWhhc2gtdmFsdWUg
aGFzaCkpKSkpCisgICAgICAgICAgICAgIGAoaGFzaCAsaGFzaCkpCiAgICAgICAgICA7OyBGSVhN
RTogaW4gb3JkZXIgdG8gYmUgYWJsZSB0byB0aHJvdyBhd2F5IHRoZSBkaXJlY3RvcnkgcHJlZml4
LAogICAgICAgICAgOzsgd2UganVzdCBhc3N1bWUgdGhhdCB0aGUgcGF0Y2ggZmlsZXMgY2FuIGJl
IGZvdW5kIHdpdGgKICAgICAgICAgIDs7ICJzZWFyY2gtcGF0Y2hlcyIuCi0tIAoyLjI0LjMgKEFw
cGxlIEdpdC0xMjgpCgo=
--0000000000001dd3eb05b1f97cde--




Information forwarded to guix-patches@HIDDEN:
bug#44038; Package guix-patches. Full text available.

Message received at 44038 <at> debbugs.gnu.org:


Received: (at 44038) by debbugs.gnu.org; 17 Oct 2020 20:21:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 17 16:21:54 2020
Received: from localhost ([127.0.0.1]:35605 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kTsiA-0005hO-2s
	for submit <at> debbugs.gnu.org; Sat, 17 Oct 2020 16:21:54 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53724)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kTsi8-0005h9-Nj
 for 44038 <at> debbugs.gnu.org; Sat, 17 Oct 2020 16:21:53 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:33128)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1kTsi3-00032y-GF; Sat, 17 Oct 2020 16:21:47 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=40694 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1kTsi3-00037X-4A; Sat, 17 Oct 2020 16:21:47 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Helio Machado <0x2b3bfa0@HIDDEN>
Subject: Re: [bug#44038] [PATCH] Fix deprecation warning for origin-sha256
References: <CANe01w5vyRSF2ZqycmR2CukB_DXpJHYLQix-Ao+nAg5B=ECPWw@HIDDEN>
Date: Sat, 17 Oct 2020 22:21:45 +0200
In-Reply-To: <CANe01w5vyRSF2ZqycmR2CukB_DXpJHYLQix-Ao+nAg5B=ECPWw@HIDDEN>
 (Helio Machado's message of "Fri, 16 Oct 2020 18:14:29 +0200")
Message-ID: <87y2k44n8m.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 44038
Cc: 44038 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Helio Machado <0x2b3bfa0@HIDDEN> skribis:

> This patch fixes the following build-time deprecation warning:
>
>     guix/import/print.scm:77:21: warning: 'origin-sha256' is deprecated,
> use 'origin-hash' instead

Thanks for looking into it!  The deprecation warning is a bit confusing
though in this case because =E2=80=98origin-hash=E2=80=99 is not exactly a =
drop-in
replacement for =E2=80=98origin-sha256=E2=80=99, as can be seen in the manu=
al, so this
patch wouldn=E2=80=99t have the desired effect.

Instead, =E2=80=98print.scm=E2=80=99 could be changed to emit a (sha256 =E2=
=80=A6) form when the
<content-hash> object is indeed a sha256 hash, and otherwise use a (hash
=E2=80=A6) form.

See
<https://guix.gnu.org/manual/devel/en/html_node/origin-Reference.html#index=
-content_002dhash>.

Thanks,
Ludo=E2=80=99.




Information forwarded to guix-patches@HIDDEN:
bug#44038; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 16 Oct 2020 18:22:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 16 14:22:12 2020
Received: from localhost ([127.0.0.1]:60812 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kTUMm-0002qA-Mg
	for submit <at> debbugs.gnu.org; Fri, 16 Oct 2020 14:22:12 -0400
Received: from lists.gnu.org ([209.51.188.17]:50386)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <0x2b3bfa0@HIDDEN>) id 1kTSNo-00063k-QE
 for submit <at> debbugs.gnu.org; Fri, 16 Oct 2020 12:15:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47916)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <0x2b3bfa0@HIDDEN>)
 id 1kTSNo-00059A-Kc
 for guix-patches@HIDDEN; Fri, 16 Oct 2020 12:15:08 -0400
Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]:38615)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <0x2b3bfa0@HIDDEN>)
 id 1kTSNm-0007tm-S8
 for guix-patches@HIDDEN; Fri, 16 Oct 2020 12:15:08 -0400
Received: by mail-qv1-xf36.google.com with SMTP id de3so1306790qvb.5
 for <guix-patches@HIDDEN>; Fri, 16 Oct 2020 09:15:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:sender:from:date:message-id:subject:to;
 bh=f9QG94S3cWIjNQRVCrqJd/bIKpwrOoMYhmTkGsxIqRE=;
 b=lS4Yd9DMr25njlClKzRbRfowAy9W12abCoIYSM+e3MmFhYO+RHbhYMCKpufBpgyV13
 GmgvJprqsEF0XqcariFXRTApBa/ljCxTu8L/kXo8Cv83chLJGwG0BDpqeWiZIiAHnKZI
 KXXsHuaOwjh+NcKLpnNTpYjaKmbSRJtWeewsobLtUg+BZnII77On3NVZuQGYs0U1p8nh
 MCB/whi5y9gKAPFiiruWgtTQEdn8kT6j5jKif27OdHyLOANBzwbBzixwqv4Il3+PnKkK
 R3D8SHy5eNGDp8sa17opO1CPjRMOUCvfYyrEx1DJG0rWPRw4R9LZy5jEH5PjZmUv8dct
 OK8g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:sender:from:date:message-id:subject
 :to; bh=f9QG94S3cWIjNQRVCrqJd/bIKpwrOoMYhmTkGsxIqRE=;
 b=KUe/ifCV+r9pGOLvWlD5wUjR5/OBKrw1zqE8MOoTwN6OGmSoouuludPzDm1RTK2dpj
 0o1rxTkxY8SPbLDUWFOiINhOjO0cQZkyu7tTvr91bVuBkuVgSiXQNyjk18O33T9ST7MN
 wrZR8twfAsIyhV4Ej8XkJONkbeIfY93nOjoI2srnlTVyjr0lL6J6jzHQu60a20HoeZJ9
 g0byb2MJ0/DvgFOLbbyrQSr1D2h3j4Pt+wjTU0OC3jiV51fRH7TEVZR5BPe6pq1y2nyT
 gutU+gx76/4sz0cn8zv8oXwPWlVpDPUz3EsO/Bxg8fKwqhDvNFAOB/JJlP4cwU1xCZ5x
 Ggjg==
X-Gm-Message-State: AOAM530LzrE4kv7hR7Dcijcgr+H155zq/okE7Cyx2/nZ8bTUh0/uGpJL
 K0hA3korcydl3InqfQxHlhKPNeS2M/yloj0pAgnx2K2bUcpdo3m5
X-Google-Smtp-Source: ABdhPJzASnoHhiLPpBaxO5XBjMaEMpgr8poJ3sQii9GGZByRgg9wKmlTL/nQmps8j7eCDpfC9Nf4K8Op657LMNzykdk=
X-Received: by 2002:a0c:fd42:: with SMTP id j2mr4524902qvs.37.1602864905613;
 Fri, 16 Oct 2020 09:15:05 -0700 (PDT)
MIME-Version: 1.0
X-Google-Sender-Delegation: heliomachadomegias@HIDDEN
From: Helio Machado <0x2b3bfa0@HIDDEN>
Date: Fri, 16 Oct 2020 18:14:29 +0200
X-Google-Sender-Auth: A1JneJl-MZijZNPFSWCc27GagFs
Message-ID: <CANe01w5vyRSF2ZqycmR2CukB_DXpJHYLQix-Ao+nAg5B=ECPWw@HIDDEN>
Subject: [PATCH] Fix deprecation warning for origin-sha256
To: guix-patches@HIDDEN
Content-Type: multipart/mixed; boundary="000000000000528beb05b1cc116c"
Received-SPF: pass client-ip=2607:f8b0:4864:20::f36;
 envelope-from=0x2b3bfa0@HIDDEN; helo=mail-qv1-xf36.google.com
X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache.
 That's all we know.
X-Spam_score_int: -17
X-Spam_score: -1.8
X-Spam_bar: -
X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 16 Oct 2020 14:22:11 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.1 (--)

--000000000000528beb05b1cc116c
Content-Type: multipart/alternative; boundary="000000000000528be905b1cc116a"

--000000000000528be905b1cc116a
Content-Type: text/plain; charset="UTF-8"

This patch fixes the following build-time deprecation warning:

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

--000000000000528be905b1cc116a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">This patch fixes the following build-time=
 deprecation warning:<div><br></div><div>=C2=A0 =C2=A0 guix/import/print.sc=
m:77:21: warning: &#39;origin-sha256&#39; is deprecated, use &#39;origin-ha=
sh&#39; instead<br></div></div></div>

--000000000000528be905b1cc116a--

--000000000000528beb05b1cc116c
Content-Type: application/octet-stream; 
	name="0001-guix-import-Fix-deprecation-warning-for-origin-sha25.patch"
Content-Disposition: attachment; 
	filename="0001-guix-import-Fix-deprecation-warning-for-origin-sha25.patch"
Content-Transfer-Encoding: base64
Content-ID: <f_kgcga0bb0>
X-Attachment-Id: f_kgcga0bb0

RnJvbSA1MzFhZWZkY2NlNTAzMzMyYmFjYjk3ZjM0Y2Q2OGUyNDlhODIwY2YwIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBIZWxpbyBNYWNoYWRvIDwweDJiM2JmYTArZ2l0QGdvb2dsZW1h
aWwuY29tPgpEYXRlOiBGcmksIDE2IE9jdCAyMDIwIDE4OjA3OjI2ICswMjAwClN1YmplY3Q6IFtQ
QVRDSF0gZ3VpeC9pbXBvcnQ6IEZpeCBkZXByZWNhdGlvbiB3YXJuaW5nIGZvciBvcmlnaW4tc2hh
MjU2CgoqIGd1aXgvaW1wb3J0L3ByaW50LnNjbSAoc291cmNlLT5jb2RlIHNvdXJjZSB2ZXJzaW9u
KTogUmVwbGFjZQpvcmlnaW4tc2hhMjU2IGJ5IG9yaWdpbi1oYXNoCi0tLQogZ3VpeC9pbXBvcnQv
cHJpbnQuc2NtIHwgMiArLQogMSBmaWxlIGNoYW5nZWQsIDEgaW5zZXJ0aW9uKCspLCAxIGRlbGV0
aW9uKC0pCgpkaWZmIC0tZ2l0IGEvZ3VpeC9pbXBvcnQvcHJpbnQuc2NtIGIvZ3VpeC9pbXBvcnQv
cHJpbnQuc2NtCmluZGV4IDExY2MyMTgyODUuLmFmYmI2ODA2MDcgMTAwNjQ0Ci0tLSBhL2d1aXgv
aW1wb3J0L3ByaW50LnNjbQorKysgYi9ndWl4L2ltcG9ydC9wcmludC5zY20KQEAgLTc0LDcgKzc0
LDcgQEAgd2hlbiBldmFsdWF0ZWQuIgogICAoZGVmaW5lIChzb3VyY2UtPmNvZGUgc291cmNlIHZl
cnNpb24pCiAgICAgKGxldCAoKHVyaSAgICAgICAob3JpZ2luLXVyaSBzb3VyY2UpKQogICAgICAg
ICAgIChtZXRob2QgICAgKG9yaWdpbi1tZXRob2Qgc291cmNlKSkKLSAgICAgICAgICAoc2hhMjU2
ICAgIChvcmlnaW4tc2hhMjU2IHNvdXJjZSkpCisgICAgICAgICAgKHNoYTI1NiAgICAob3JpZ2lu
LWhhc2ggc291cmNlKSkKICAgICAgICAgICAoZmlsZS1uYW1lIChvcmlnaW4tZmlsZS1uYW1lIHNv
dXJjZSkpCiAgICAgICAgICAgKHBhdGNoZXMgICAob3JpZ2luLXBhdGNoZXMgc291cmNlKSkpCiAg
ICAgICBgKG9yaWdpbgotLSAKMi4yNC4zIChBcHBsZSBHaXQtMTI4KQoK
--000000000000528beb05b1cc116c--




Acknowledgement sent to Helio Machado <0x2b3bfa0@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#44038; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 19 Oct 2020 09:00:02 UTC

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