diff options
author | Ludovic Courtès <ludo@gnu.org> | 2013-03-05 20:30:27 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2013-03-05 20:35:47 +0100 |
commit | ef010c0f3d414f7107de80e0835d1e347b04315b (patch) | |
tree | 356bc3ac554f76b9655b446c52c2599509f70370 /guix/gnu-maintenance.scm | |
parent | c50cbfd61a540e120b922fa16bf6ab8533c37b0b (diff) |
guix package: Inform about new upstream versions of GNU packages.
* guix/gnu-maintenance.scm (gnu-package?): New procedure.
* guix/scripts/package.scm (waiting): New macro.
(check-package-freshness): New procedure.
(guix-package)[process-actions]: Use it.
* doc/guix.texi (Invoking guix package): Mention the feature.
Diffstat (limited to 'guix/gnu-maintenance.scm')
-rw-r--r-- | guix/gnu-maintenance.scm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/guix/gnu-maintenance.scm b/guix/gnu-maintenance.scm index 6475c386d3..981bb81919 100644 --- a/guix/gnu-maintenance.scm +++ b/guix/gnu-maintenance.scm @@ -29,7 +29,9 @@ #:use-module (system foreign) #:use-module (guix ftp-client) #:use-module (guix utils) + #:use-module (guix packages) #:export (official-gnu-packages + gnu-package? releases latest-release gnu-package-name->name+version)) @@ -74,6 +76,18 @@ (and=> (regexp-exec %package-line-rx line) (cut match:substring <> 1))) lst))) + +(define gnu-package? + (memoize + (lambda (package) + "Return true if PACKAGE is a GNU package. This procedure may access the +network to check in GNU's database." + ;; TODO: Find a way to determine that a package is non-GNU without going + ;; through the network. + (let ((url (origin-uri (package-source package)))) + (or (string-prefix? "mirror://gnu" url) + (member (package-name package) (official-gnu-packages))))))) + ;;; ;;; Latest release. |