From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id QH0BGXJVjV/6RwAA0tVLHw (envelope-from ) for ; Mon, 19 Oct 2020 08:59:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mJDPFHJVjV9HSwAAB5/wlQ (envelope-from ) for ; Mon, 19 Oct 2020 08:59:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D58B29400D3 for ; Mon, 19 Oct 2020 08:59:29 +0000 (UTC) Received: from localhost ([::1]:45216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUR0q-0006DB-Nm for larch@yhetil.org; Mon, 19 Oct 2020 04:59:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUQzU-0004MG-D2 for guix-patches@gnu.org; Mon, 19 Oct 2020 04:58:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kUQzU-0004i4-3O for guix-patches@gnu.org; Mon, 19 Oct 2020 04:58:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kUQzU-0006LZ-30 for guix-patches@gnu.org; Mon, 19 Oct 2020 04:58:04 -0400 Subject: bug#44038: [PATCH] Fix deprecation warning for origin-sha256 Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Mon, 19 Oct 2020 08:58:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 44038 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Helio Machado <0x2b3bfa0@gmail.com> Cc: 44038-done@debbugs.gnu.org Mail-Followup-To: 44038@debbugs.gnu.org, ludo@gnu.org, 0x2b3bfa0@gmail.com Received: via spool by 44038-done@debbugs.gnu.org id=D44038.160309785224221 (code D ref 44038); Mon, 19 Oct 2020 08:58:03 +0000 Received: (at 44038-done) by debbugs.gnu.org; 19 Oct 2020 08:57:32 +0000 Received: from localhost ([127.0.0.1]:39970 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUQyy-0006Ib-BA for submit@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 ) id 1kUQyw-0006IB-9b for 44038-done@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 ) 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 ) id 1kUQyp-0005wn-9o; Mon, 19 Oct 2020 04:57:23 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87y2k44n8m.fsf@gnu.org> 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: (Helio Machado's message of "Mon, 19 Oct 2020 00:25:34 +0200") Message-ID: <87k0vm1tla.fsf@gnu.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -1.51 X-TUID: zbPT8IKnvYez --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 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". --=-=-=--