summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2025-02-23 15:34:49 +0900
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2025-03-03 00:31:45 +0900
commit8176277487ea71eab9e23e1b9ba55a46c971b3d1 (patch)
tree5871d276e553caa7aec7970efe1e391fe3451ae8
parentd0e46a0003de1bc2a44c293a0d9ea24316bc8c37 (diff)
import: Avoid duplicate trailing '/' in computed import URL.
Unlike for file names, duplicate slashes in URLs matter. For example attempting to refresh 'qemu' would previously not find any result because it'd try to find links from 'https://download.qemu.org//', which is unreachable. * guix/gnu-maintenance.scm (import-html-release): Use canonicalize-url to join BASE-URL and DIRECTORY, which handles trailing '/' correctly. Change-Id: I108a542c4eede85c78a47f62921184273dc1ea01
-rw-r--r--guix/gnu-maintenance.scm4
1 files changed, 1 insertions, 3 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm
index f26d8c5fbc..1b628a772f 100644
--- a/guix/gnu-maintenance.scm
+++ b/guix/gnu-maintenance.scm
@@ -677,9 +677,7 @@ also updated to the latest version, as explained in the doc of the
\"rewrite-url\" procedure used."
(let* ((current-version (package-version package))
(name (package-upstream-name package))
- (url (if (string-null? directory)
- base-url
- (string-append base-url directory "/")))
+ (url (canonicalize-url directory base-url))
(url (if rewrite-url?
(rewrite-url url current-version #:to-version version
#:partial-version? partial-version?)