diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-10-26 21:16:20 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-10-27 00:01:20 +0100 |
commit | ad18c7e64c844350f295a2f79605800a7718ed78 (patch) | |
tree | f9592d3bafeab8ca6a54a8aa749b7d69198a9486 /guix/scripts | |
parent | d50cb56d9b58f3e1605f59b35ce99942c3b70d24 (diff) |
ui: Add procedures to display a profile generation.
* guix/scripts/package.scm (guix-package)[process-query](list-generations):
Move part of the body to 'delete-generation' and
'display-profile-content'.
* guix/ui.scm (display-generation, display-profile-content): New
procedures.
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/package.scm | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index ee45cddedd..49df3349e8 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -789,25 +789,8 @@ more information.~%")) (('list-generations pattern) (define (list-generation number) (unless (zero? number) - (let ((header (format #f (_ "Generation ~a\t~a") number - (date->string - (time-utc->date - (generation-time profile number)) - "~b ~d ~Y ~T"))) - (current (generation-number profile))) - (if (= number current) - (format #t (_ "~a\t(current)~%") header) - (format #t "~a~%" header))) - (for-each (match-lambda - (($ <manifest-entry> name version output location _) - (format #t " ~a\t~a\t~a\t~a~%" - name version output location))) - - ;; Show most recently installed packages last. - (reverse - (manifest-entries - (profile-manifest - (generation-file-name profile number))))) + (display-generation profile number) + (display-profile-content profile number) (newline))) (cond ((not (file-exists? profile)) ; XXX: race condition |