From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:58003) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i9cuE-0002Ja-E4 for guix-patches@gnu.org; Sun, 15 Sep 2019 18:22:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i9cuD-0007AG-Gn for guix-patches@gnu.org; Sun, 15 Sep 2019 18:22:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40027) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i9cuD-0007AA-DN for guix-patches@gnu.org; Sun, 15 Sep 2019 18:22:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i9cuD-0007hH-9D for guix-patches@gnu.org; Sun, 15 Sep 2019 18:22:05 -0400 Subject: [bug#37413] [PATCH 7/9] pull: '-l' displays channel news. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Mon, 16 Sep 2019 00:21:04 +0200 Message-Id: <20190915222106.4463-7-ludo@gnu.org> In-Reply-To: <20190915222106.4463-1-ludo@gnu.org> References: <20190915222106.4463-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 37413@debbugs.gnu.org * guix/scripts/pull.scm (display-channel-news): Make 'previous' a parameter. (process-query)[list-generations]: Call 'display-channel-news'. --- guix/scripts/pull.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/guix/scripts/pull.scm b/guix/scripts/pull.scm index 8edff1a502..91ffd0ab98 100644 --- a/guix/scripts/pull.scm +++ b/guix/scripts/pull.scm @@ -251,12 +251,12 @@ and NEW are records with a proper 'commit' field." (for-each (cut display-news-entry <> language port) entries) (newline port))))))) -(define (display-channel-news profile) - "Display new 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))) @@ -586,6 +586,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)))))) -- 2.23.0