From patchwork Mon Oct 19 08:57:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 24687 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2410827BBEE; Mon, 19 Oct 2020 09:59:29 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E2AD927BBED for ; Mon, 19 Oct 2020 09:59:28 +0100 (BST) Received: from localhost ([::1]:45216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUR0p-0006DB-TE for patchwork@mira.cbaines.net; Mon, 19 Oct 2020 04:59:27 -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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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 ‘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".