gnu-maintenance: Produce mirror:// URIs in latest-ftp-release.

Partially fixes <https://issues.guix.gnu.org/57477>.

As a test, try updating gnupg.  Before the patch, a ftp:// URL was produced,
now the mirror:// is preserved.

* guix/gnu-maintenance.scm (latest-ftp-release)[file->source]{urls,signature-urls}:
Call uri-mirror-rewrite on the URLs.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Maxime Devos 2022-09-01 11:01:49 +02:00 committed by Ludovic Courtès
parent fc5c4ce4ec
commit d877dc098b
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -363,10 +363,12 @@ (define (file->source directory file)
(upstream-source
(package project)
(version (tarball->version file))
(urls (list url))
;; uri-mirror-rewrite: Don't turn nice mirror:// URIs into ftp://
;; URLs during "guix refresh -u".
(urls (list (uri-mirror-rewrite url)))
(signature-urls (match (file->signature url)
(#f #f)
(sig (list sig)))))))
(sig (list (uri-mirror-rewrite sig))))))))
(let loop ((directory directory)
(result #f))