import: github: Use correct URL scheme.

This effects packages hosted at github with source-uri like
…/releases/download/REPO-VERSION/REPO-VERSION.EXT.
E.g. ‘guix refresh udisks’ would fail to find the new release of ‘udisks’
before this change.

* guix/import/github.scm(updated-url): For one one of the
  cases add missing 'prefix' and set new version.
This commit is contained in:
Hartmut Goebel 2022-06-29 12:54:38 +02:00
parent e0e87fe3a6
commit e8cd9e3d12
No known key found for this signature in database
GPG key ID: 634A8DFFD3F631DF

View file

@ -5,6 +5,7 @@
;;; Copyright © 2019 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 Hartmut Goebel <h.goebel@crazy-compilers.com>
;;;
;;; This file is part of GNU Guix.
;;;
@ -95,8 +96,8 @@ (define (updated-url url)
((string-suffix? (string-append "/releases/download/" repo "-"
version "/" repo "-" version ext)
url)
(string-append "/releases/download/" repo "-" version "/" repo "-"
version ext))
(string-append prefix "/releases/download/" repo "-" new-version "/"
repo "-" new-version ext))
(#t #f))) ; Some URLs are not recognised.
#f))