@@ -250,14 +250,31 @@ (define (importer-modules)
%load-path)
#:warn warn-about-load-error)))
+(define (sort-updaters updaters)
+ "Sort UPDATERS by putting the more generic ones last."
+ (define (genericity updater)
+ (cond
+ ((equal? 'repology (upstream-updater-name updater))
+ 2)
+ ((string-prefix? "generic-"
+ (symbol->string (upstream-updater-name updater)))
+ 1)
+ (else 0)))
+
+ (define (less a b)
+ (<= (genericity a) (genericity b)))
+
+ (stable-sort updaters less))
+
(define %updaters
;; The list of publically-known updaters.
- (delay (fold-module-public-variables (lambda (obj result)
- (if (upstream-updater? obj)
- (cons obj result)
- result))
- '()
- (importer-modules))))
+ (delay (sort-updaters
+ (fold-module-public-variables (lambda (obj result)
+ (if (upstream-updater? obj)
+ (cons obj result)
+ result))
+ '()
+ (importer-modules)))))
;; Tests need to mock this variable so mark it as "non-declarative".
(set! %updaters %updaters)