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>master
parent
6586c114e9
commit
5481aaacb5
|
@ -74,7 +74,6 @@
|
||||||
origin-uri
|
origin-uri
|
||||||
origin-method
|
origin-method
|
||||||
origin-hash
|
origin-hash
|
||||||
origin-sha256 ;deprecated
|
|
||||||
origin-file-name
|
origin-file-name
|
||||||
origin-actual-file-name
|
origin-actual-file-name
|
||||||
origin-patches
|
origin-patches
|
||||||
|
@ -346,14 +345,6 @@ as base32. Otherwise, it must be a bytevector."
|
||||||
specifications to 'hash'."
|
specifications to 'hash'."
|
||||||
(origin-compatibility-helper (fields ...) ()))
|
(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)
|
(define (print-origin origin port)
|
||||||
"Write a concise representation of ORIGIN to PORT."
|
"Write a concise representation of ORIGIN to PORT."
|
||||||
(match origin
|
(match origin
|
||||||
|
|
|
@ -141,7 +141,7 @@ Differences are hard to spot, e.g. in CLOS vs. GOOPS."))
|
||||||
(license:license? (package-license pkg))
|
(license:license? (package-license pkg))
|
||||||
(build-system? (package-build-system pkg))
|
(build-system? (package-build-system pkg))
|
||||||
(origin? (package-source pkg))
|
(origin? (package-source pkg))
|
||||||
(equal? (origin-sha256 (package-source pkg))
|
(equal? (content-hash-value (origin-hash (package-source pkg)))
|
||||||
(base32 "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i")))))
|
(base32 "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i")))))
|
||||||
|
|
||||||
(test-equal "alist->package with false license" ;<https://bugs.gnu.org/30470>
|
(test-equal "alist->package with false license" ;<https://bugs.gnu.org/30470>
|
||||||
|
|
Reference in New Issue