~ruther/guix-local

561f4e450078a06c707d3dcda2cf0e7d6eb5ebae — Ludovic Courtès 9 years ago edbe07c
guix package: '-l' correctly handles zero-generation profiles.

* guix/scripts/package.scm (process-query) <'list-generations>: Properly
handle the case where 'profile-generations' returns the empty list.
1 files changed, 6 insertions(+), 3 deletions(-)

M guix/scripts/package.scm
M guix/scripts/package.scm => guix/scripts/package.scm +6 -3
@@ 713,9 713,12 @@ processed, #f otherwise."
               (raise (condition (&profile-not-found-error
                                  (profile profile)))))
              ((string-null? pattern)
               (list-generation display-profile-content
                                (car (profile-generations profile)))
               (diff-profiles profile (profile-generations profile)))
               (match (profile-generations profile)
                 (()
                  #t)
                 ((first rest ...)
                  (list-generation display-profile-content first)
                  (diff-profiles profile (cons first rest)))))
              ((matching-generations pattern profile)
               =>
               (lambda (numbers)