summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-09-02 21:25:57 +0200
committerLudovic Courtès <ludo@gnu.org>2014-09-02 21:25:57 +0200
commit9a914764313657b82225cc36feb05ac50fe26635 (patch)
treec9af3ba2a6d9ad6eef25e80167c7098361a1ea8c
parentef8993e2dc90fd5d63d016fc45912ad451bf787c (diff)
downloadguix-9a914764313657b82225cc36feb05ac50fe26635.tar.gz
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".
-rw-r--r--guix/profiles.scm10
1 files 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
-      ((($ <manifest-entry> name version output item _) ..1)
+      ((($ <manifest-entry> name version output item) ..1)
        (let ((len    (length name))
              (remove (package-strings name version output item)))
          (if dry-run?