This is an automated email from the git hooks/post-receive script.

civodul pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new fada92b  guix describe: 'display-profile-content' checks the right 
generation.
fada92b is described below

commit fada92bb807aabd514ad20b86ad3a35a7ccbc9e7
Author: Ludovic Courtès <[email protected]>
AuthorDate: Fri Feb 5 22:56:53 2021 +0100

    guix describe: 'display-profile-content' checks the right generation.
    
    Fixes a regression introduced in
    316fc2acbb112bfa572ae30f95a93bcd56621234, whereby 'guix pull -l' would
    always display channel information corresponding to the latest profile
    generation.
    
    Reported by Vagrant Cascadian.
    
    * guix/scripts/describe.scm (profile-generation-channels): New
    procedure.
    (display-profile-content): Change default value of 'channels'.
---
 guix/scripts/describe.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/guix/scripts/describe.scm b/guix/scripts/describe.scm
index cd5d383..6f8d9ac 100644
--- a/guix/scripts/describe.scm
+++ b/guix/scripts/describe.scm
@@ -211,9 +211,17 @@ what matters."
                   channels))))
   (display-package-search-path fmt))
 
+(define (profile-generation-channels profile number)
+  "Return the list of channels for generation NUMBER of PROFILE."
+  (profile-channels (if (zero? number)
+                        profile
+                        (generation-file-name profile number))))
+
 (define* (display-profile-content profile number
                                   #:optional
-                                  (channels (profile-channels profile)))
+                                  (channels
+                                   (profile-generation-channels profile
+                                                                number)))
   "Display CHANNELS along with PROFILE info, generation NUMBER, in a
 human-readable way and displaying details about the channel's source code.
 PROFILE and NUMBER "

Reply via email to