From 9a914764313657b82225cc36feb05ac50fe26635 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 2 Sep 2014 21:25:57 +0200 Subject: profiles: Report version numbers in a separate column. * guix/profiles.scm (manifest-show-transaction)[package-strings, upgrade-strings]: Show version number in separate column. Show OUTPUT in first column, and only when it's different from "out". --- guix/profiles.scm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index 52bd5bc332..919f27d250 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -333,7 +333,9 @@ replacement if PORT is not Unicode-capable." "Display what will/would be installed/removed from MANIFEST by TRANSACTION." (define (package-strings name version output item) (map (lambda (name version output item) - (format #f " ~a-~a\t~a\t~a" name version output + (format #f " ~a~:[:~a~;~*~]\t~a\t~a" + name + (equal? output "out") output version (if (package? item) (package-output store item output) item))) @@ -343,9 +345,9 @@ replacement if PORT is not Unicode-capable." (right-arrow (current-error-port))) (define (upgrade-string name old-version new-version output item) - (format #f " ~a\t~a ~a ~a\t~a\t~a" name + (format #f " ~a~:[:~a~;~*~]\t~a ~a ~a\t~a" + name (equal? output "out") output old-version → new-version - output (if (package? item) (package-output store item output) item))) @@ -353,7 +355,7 @@ replacement if PORT is not Unicode-capable." (let-values (((remove install upgrade) (manifest-transaction-effects manifest transaction))) (match remove - ((($ name version output item _) ..1) + ((($ name version output item) ..1) (let ((len (length name)) (remove (package-strings name version output item))) (if dry-run? -- cgit v1.2.3