From adf0c531a845fb03c92e1f28e26e5c31adb95e4a Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 6 Jul 2017 09:13:31 +0300 Subject: guix: lint: Add checker for new upstream versions. * guix/scripts/lint.scm (check-for-updates): New procedure. (%checkers): Add it. * guix/scripts/refresh.scm (importer-modules, %updaters): Move from here ... * guix/upstream.scm: ... to here. --- guix/upstream.scm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'guix/upstream.scm') diff --git a/guix/upstream.scm b/guix/upstream.scm index 6ad52ac960..0fe3308876 100644 --- a/guix/upstream.scm +++ b/guix/upstream.scm @@ -20,6 +20,7 @@ (define-module (guix upstream) #:use-module (guix records) #:use-module (guix utils) + #:use-module (guix discovery) #:use-module ((guix download) #:select (download-to-store)) #:use-module (guix gnupg) @@ -55,6 +56,7 @@ upstream-updater-predicate upstream-updater-latest + %updaters lookup-updater download-tarball @@ -146,6 +148,22 @@ correspond to the same version." (pred upstream-updater-predicate) (latest upstream-updater-latest)) +(define (importer-modules) + "Return the list of importer modules." + (cons (resolve-interface '(guix gnu-maintenance)) + (all-modules (map (lambda (entry) + `(,entry . "guix/import")) + %load-path)))) + +(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)))) + (define (lookup-updater package updaters) "Return an updater among UPDATERS that matches PACKAGE, or #f if none of them matches." -- cgit v1.2.3