mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
upstream: Sort '%updaters' alphabetically.
Previously the output of 'guix refresh --list-updaters' would be non-deterministic, and likewise the order in which updaters are tried would be non-deterministic. Reported by zimoun <zimon.toutoune@gmail.com>. * guix/upstream.scm (%updaters): Add call to 'sort'.
This commit is contained in:
parent
d519305d83
commit
e87c6fb95a
1 changed files with 11 additions and 7 deletions
|
@ -251,13 +251,17 @@ (define (importer-modules)
|
||||||
#:warn warn-about-load-error)))
|
#:warn warn-about-load-error)))
|
||||||
|
|
||||||
(define %updaters
|
(define %updaters
|
||||||
;; The list of publically-known updaters.
|
;; The list of publically-known updaters, alphabetically sorted.
|
||||||
(delay (fold-module-public-variables (lambda (obj result)
|
(delay
|
||||||
(if (upstream-updater? obj)
|
(sort (fold-module-public-variables (lambda (obj result)
|
||||||
(cons obj result)
|
(if (upstream-updater? obj)
|
||||||
result))
|
(cons obj result)
|
||||||
'()
|
result))
|
||||||
(importer-modules))))
|
'()
|
||||||
|
(importer-modules))
|
||||||
|
(lambda (updater1 updater2)
|
||||||
|
(string<? (symbol->string (upstream-updater-name updater1))
|
||||||
|
(symbol->string (upstream-updater-name updater2)))))))
|
||||||
|
|
||||||
;; Tests need to mock this variable so mark it as "non-declarative".
|
;; Tests need to mock this variable so mark it as "non-declarative".
|
||||||
(set! %updaters %updaters)
|
(set! %updaters %updaters)
|
||||||
|
|
Loading…
Reference in a new issue