mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-15 03:15:09 -05:00
gnu-maintenance: 'gnu' updater prefers tarball with same compression.
Fixes <https://issues.guix.gnu.org/59168>. Previously 'guix build make --with-latest=make' would pick ".tar.lz", rather than "tar.gz", because "tar.lz" happened to come first in the <upstream-source> 'urls' field. * guix/gnu-maintenance.scm (latest-gnu-release)[archive-type] [better-tarball?]: New variables. Sort TARBALLS according to BETTER-TARBALL?.
This commit is contained in:
parent
692d987d0f
commit
9a35e4c5bd
1 changed files with 9 additions and 1 deletions
|
@ -596,6 +596,12 @@ (define (latest-gnu-release package)
|
||||||
|
|
||||||
This method does not rely on FTP access at all; instead, it browses the file
|
This method does not rely on FTP access at all; instead, it browses the file
|
||||||
list available from %GNU-FILE-LIST-URI over HTTP(S)."
|
list available from %GNU-FILE-LIST-URI over HTTP(S)."
|
||||||
|
(define archive-type
|
||||||
|
(package-archive-type package))
|
||||||
|
|
||||||
|
(define (better-tarball? tarball1 tarball2)
|
||||||
|
(string=? (file-extension tarball1) archive-type))
|
||||||
|
|
||||||
(let-values (((server directory)
|
(let-values (((server directory)
|
||||||
(ftp-server/directory package))
|
(ftp-server/directory package))
|
||||||
((name)
|
((name)
|
||||||
|
@ -626,7 +632,9 @@ (define (latest-gnu-release package)
|
||||||
(string-append "mirror://gnu/"
|
(string-append "mirror://gnu/"
|
||||||
(string-drop file
|
(string-drop file
|
||||||
(string-length "/gnu/"))))
|
(string-length "/gnu/"))))
|
||||||
tarballs))
|
;; Sort so that the tarball with the same compression
|
||||||
|
;; format as currently used in PACKAGE comes first.
|
||||||
|
(sort tarballs better-tarball?)))
|
||||||
(signature-urls (map (cut string-append <> ".sig") urls)))))
|
(signature-urls (map (cut string-append <> ".sig") urls)))))
|
||||||
(()
|
(()
|
||||||
#f)))))
|
#f)))))
|
||||||
|
|
Loading…
Reference in a new issue