diff options
author | Ludovic Courtès <ludo@gnu.org> | 2023-05-04 09:09:03 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-05-06 17:12:45 +0200 |
commit | 71fd35c1d55988c413a37c7d15006b4d38d7dde7 (patch) | |
tree | 5f26d2b6ac0f3adfc685cc6505730f1f8783d260 /guix/lint.scm | |
parent | 5c5bdab9295f275b6b717259d7a413b216867763 (diff) | |
download | guix-patches-71fd35c1d55988c413a37c7d15006b4d38d7dde7.tar guix-patches-71fd35c1d55988c413a37c7d15006b4d38d7dde7.tar.gz |
lint: archival: Warn against non-origin package sources.
Suggested by Maxim Cournoyer <maxim.cournoyer@gmail.com>
and Simon Tournier <zimon.toutoune@gmail.com>.
* guix/lint.scm (check-archival): Add 'local-file?' clause. Clarify
message in case (package-source package) is not an origin.
* tests/lint.scm ("archival: not an origin"): New test.
Diffstat (limited to 'guix/lint.scm')
-rw-r--r-- | guix/lint.scm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/guix/lint.scm b/guix/lint.scm index 0ed5b8dc98..72b3f4e7b1 100644 --- a/guix/lint.scm +++ b/guix/lint.scm @@ -1610,11 +1610,11 @@ try again later") (parameterize ((%allow-request? skip-when-limit-reached)) (catch #t (lambda () - (match (and (origin? (package-source package)) - (package-source package)) + (match (package-source package) (#f ;no source '()) - ((= origin-uri (? git-reference? reference)) + ((and (? origin?) + (= origin-uri (? git-reference? reference))) (define url (git-reference-url reference)) (define commit @@ -1680,9 +1680,12 @@ Disarchive entry refers to non-existent SWH directory '~a'") ((? content?) '()))) '())) + ((? local-file?) + '()) (_ (list (make-warning package - (G_ "unsupported source type") + (G_ "\ +source is not an origin, it cannot be archived") #:field 'source))))) (match-lambda* (('swh-error url method response) |