summary refs log tree commit diff
diff options
context:
space:
mode:
authorBruno Victal <mirai@makinata.eu>2023-02-27 00:11:44 +0000
committerLudovic Courtès <ludo@gnu.org>2023-04-07 18:00:08 +0200
commit5481aaacb5f60ba43d8db7e51cb7cc967d5eb55e (patch)
treebab2aa8c994b04fdabbc67c1d8840be6acbf7f4f
parent6586c114e96585543e70e916902dd38b40d46c96 (diff)
downloadguix-5481aaacb5f60ba43d8db7e51cb7cc967d5eb55e.tar.gz
packages: Remove 'origin-sha256' procedure.
* guix/packages.scm (origin-sha256): Remove procedure.
* tests/import-utils.scm (test-import-utils)
[alist->package with explicit source]: Use content-hash-value.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--guix/packages.scm9
-rw-r--r--tests/import-utils.scm2
2 files changed, 1 insertions, 10 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 4c0c194652..2d33212f44 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -74,7 +74,6 @@
             origin-uri
             origin-method
             origin-hash
-            origin-sha256                         ;deprecated
             origin-file-name
             origin-actual-file-name
             origin-patches
@@ -346,14 +345,6 @@ as base32.  Otherwise, it must be a bytevector."
 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 @@ Differences are hard to spot, e.g. in CLOS vs. GOOPS."))
          (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"  ;<https://bugs.gnu.org/30470>