diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-09-15 23:55:19 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-09-23 10:38:44 +0200 |
commit | 192ee02aeb3d2f6d14ea93cfc43b30dd93df80e8 (patch) | |
tree | c7da8b7da22143f0e70ada43c06e34f03284a6fd | |
parent | 7faffdc2d53b982d8443c376d6ed2f41a13b3f36 (diff) | |
download | guix-192ee02aeb3d2f6d14ea93cfc43b30dd93df80e8.tar.gz |
pull: '-l' displays channel news.
* guix/scripts/pull.scm (display-channel-news): Make 'previous' a parameter. (process-query)[list-generations]: Call 'display-channel-news'.
-rw-r--r-- | guix/scripts/pull.scm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index d734df5e24..4a4756dc6e 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -272,12 +272,12 @@ and NEW are <channel> records with a proper 'commit' field." (for-each (cut display-news-entry <> language port) entries) (newline port))))))) -(define (display-channel-news profile) - "Display news about the channels of PROFILE " - (define previous - (and=> (relative-generation profile -1) - (cut generation-file-name profile <>))) - +(define* (display-channel-news profile + #:optional + (previous + (and=> (relative-generation profile -1) + (cut generation-file-name profile <>)))) + "Display news about the channels of PROFILE compared to PREVIOUS." (when previous (let ((old-channels (profile-channels previous)) (new-channels (profile-channels profile))) @@ -614,6 +614,8 @@ display long package lists that would fill the user's screen." ((first second rest ...) (display-profile-content-diff profile first second) + (display-channel-news (generation-file-name profile second) + (generation-file-name profile first)) (loop (cons second rest))) ((_) #t) (() #t)))))) |