aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-05-22 00:23:15 +0200
committerLudovic Courtès <ludo@gnu.org>2020-05-22 01:30:09 +0200
commitfeea1d0e62fdd09c4b209c549d65fe93e506d690 (patch)
tree4eca106dc25445f041fdaa6f6917bb00d04b619c
parentce0be5675b702b2ff89aed1772ebb42af4150243 (diff)
downloadpatches-feea1d0e62fdd09c4b209c549d65fe93e506d690.tar
patches-feea1d0e62fdd09c4b209c549d65fe93e506d690.tar.gz
lint: archival: Use 'origin-hash'.
* guix/lint.scm (check-archival): Use 'origin-hash' instead of 'origin-sha256', removing hard-coded "sha256".
-rw-r--r--guix/lint.scm19
1 files changed, 11 insertions, 8 deletions
diff --git a/guix/lint.scm b/guix/lint.scm
index e192f292a4..6271894360 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -1154,15 +1154,18 @@ try again later")
((? origin? origin)
;; Since "save" origins are not supported for non-VCS source, all
;; we can do is tell whether a given tarball is available or not.
- (if (origin-sha256 origin) ;XXX: for ungoogled-chromium
- (match (lookup-content (origin-sha256 origin) "sha256")
- (#f
- (list (make-warning package
- (G_ "source not archived on Software \
+ (if (origin-hash origin) ;XXX: for ungoogled-chromium
+ (let ((hash (origin-hash origin)))
+ (match (lookup-content (content-hash-value hash)
+ (symbol->string
+ (content-hash-algorithm hash)))
+ (#f
+ (list (make-warning package
+ (G_ "source not archived on Software \
Heritage")
- #:field 'source)))
- ((? content?)
- '()))
+ #:field 'source)))
+ ((? content?)
+ '())))
'()))))
(match-lambda*
((key url method response)