~ruther/guix-local

e77a676f21fd1fcd38717a8a02ffcf0005e0552d — Maxim Cournoyer 1 year, 4 months ago 9449ab3
gnu-maintenance: Better fix for 'guix refresh --update'.

The previous fix introduced in commit 8176277487 ("import: Avoid duplicate
trailing '/' in computed import URL.") regressed on the handling of *file*
source URIs:

  $ guix refresh cairo --update

  Starting download of /tmp/guix-file.xUKazf
  From https://cairographics.org/cairo-1.18.4.tar.xz...
  download failed "https://cairographics.org/cairo-1.18.4.tar.xz" 404 "Not Found"

* guix/gnu-maintenance.scm (import-html-release): Revert commit 8176277487,
instead adding a trailing slash only if it doesn't already exist.

Change-Id: I6e3889f14badd8843bbf6436ad62a1594f553afe
1 files changed, 7 insertions(+), 1 deletions(-)

M guix/gnu-maintenance.scm
M guix/gnu-maintenance.scm => guix/gnu-maintenance.scm +7 -1
@@ 677,7 677,13 @@ 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 (canonicalize-url directory base-url))
         (url (if (string-null? directory)
                  base-url
                  (string-append base-url directory
                                 ;; Ensure URL ends with a trailing slash.
                                 (if (string-suffix? "/" directory)
                                     ""
                                     "/"))))
         (url (if rewrite-url?
                  (rewrite-url url current-version #:to-version version
                               #:partial-version? partial-version?)