From patchwork Mon Feb 27 00:11:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruno Victal X-Patchwork-Id: 47416 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 8C17616C03; Mon, 27 Feb 2023 00:13:40 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D579116884 for ; Mon, 27 Feb 2023 00:13:39 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWR8f-0001I8-U8; Sun, 26 Feb 2023 19:13:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWR8d-0001Gq-Ep for guix-patches@gnu.org; Sun, 26 Feb 2023 19:13:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWR8a-0007cZ-Eu for guix-patches@gnu.org; Sun, 26 Feb 2023 19:13:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pWR8a-0005X6-Am for guix-patches@gnu.org; Sun, 26 Feb 2023 19:13:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61829] [PATCH 11/11] guix: packages: Remove 'origin-sha256' procedure. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 27 Feb 2023 00:13:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61829 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61829@debbugs.gnu.org Cc: Bruno Victal Received: via spool by 61829-submit@debbugs.gnu.org id=B61829.167745673121166 (code B ref 61829); Mon, 27 Feb 2023 00:13:04 +0000 Received: (at 61829) by debbugs.gnu.org; 27 Feb 2023 00:12:11 +0000 Received: from localhost ([127.0.0.1]:45318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWR7i-0005VC-Qy for submit@debbugs.gnu.org; Sun, 26 Feb 2023 19:12:11 -0500 Received: from smtpm6.myservices.hosting ([185.26.105.207]:54078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pWR7X-0005T4-2C for 61829@debbugs.gnu.org; Sun, 26 Feb 2023 19:11:59 -0500 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpm6.myservices.hosting (Postfix) with ESMTP id 0481F20DA8 for <61829@debbugs.gnu.org>; Mon, 27 Feb 2023 01:11:54 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id B1C5580098; Mon, 27 Feb 2023 01:11:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wIp74fiVXNxu; Mon, 27 Feb 2023 01:11:54 +0100 (CET) Received: from guix-nuc.home.arpa (bl9-119-177.dsl.telepac.pt [85.242.119.177]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id D82F78009E; Mon, 27 Feb 2023 01:11:52 +0100 (CET) From: Bruno Victal Date: Mon, 27 Feb 2023 00:11:44 +0000 Message-Id: X-Mailer: git-send-email 2.39.1 In-Reply-To: References: 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/packages.scm (origin-sha256): Remove procedure. * tests/import-utils.scm (test-import-utils) [alist->package with explicit source]: Use content-hash-value. --- guix/packages.scm | 9 --------- tests/import-utils.scm | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index 041a872f9d..bded89b1e0 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -73,7 +73,6 @@ (define-module (guix packages) origin-uri origin-method origin-hash - origin-sha256 ;deprecated origin-file-name origin-actual-file-name origin-patches @@ -345,14 +344,6 @@ (define-syntax-rule (origin fields ...) specifications to 'hash'." (origin-compatibility-helper (fields ...) ())) -(define-deprecated (origin-sha256 origin) - origin-hash - (let ((hash (origin-hash origin))) - (unless (eq? (content-hash-algorithm hash) 'sha256) - (raise (condition (&message - (message (G_ "no SHA256 hash for origin")))))) - (content-hash-value hash))) - (define (print-origin origin port) "Write a concise representation of ORIGIN to PORT." (match origin diff --git a/tests/import-utils.scm b/tests/import-utils.scm index 44dff14597..1565dd610a 100644 --- a/tests/import-utils.scm +++ b/tests/import-utils.scm @@ -141,7 +141,7 @@ (define-module (test-import-utils) (license:license? (package-license pkg)) (build-system? (package-build-system pkg)) (origin? (package-source pkg)) - (equal? (origin-sha256 (package-source pkg)) + (equal? (content-hash-value (origin-hash (package-source pkg))) (base32 "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))) (test-equal "alist->package with false license" ;