guix describe: 'display-profile-content' checks the right generation.

Fixes a regression introduced in
316fc2acbb, 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'.
This commit is contained in:
Ludovic Courtès 2021-02-05 22:56:53 +01:00
parent 9c4b266ae5
commit fada92bb80
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 9 additions and 1 deletions

View File

@ -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 "