diff mbox series

[bug#57515,2/8] gnu-maintenance: Produce mirror:// URIs in latest-ftp-release.

Message ID 309bbf185a707fee8f98f741aa5a67fdce6cfda0.1662022775.git.maximedevos@telenet.be
State Accepted
Headers show
Series Stop unmirroring during updates. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

M Sept. 1, 2022, 9:01 a.m. UTC
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.
---
 guix/gnu-maintenance.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index 51e8fcd815..84fd087319 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -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))