summary refs log tree commit diff
path: root/guix-build.in
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-07-02 01:24:40 +0200
committerLudovic Courtès <ludo@gnu.org>2012-07-02 01:35:39 +0200
commit9336b5ab551a36c3ff48dc82f2b4651989cd3afd (patch)
tree39fb85501cca60871d23ec26205c0a48c4fb4cbb /guix-build.in
parentd66ac374e9c8c50893b3ac339665259f2f167669 (diff)
downloadguix-9336b5ab551a36c3ff48dc82f2b4651989cd3afd.tar.gz
guix-build: Display multiple outputs when needed.
* guix-build.in (guix-build): Display multiple outputs when there's more
  than one.
Diffstat (limited to 'guix-build.in')
-rw-r--r--guix-build.in12
1 files changed, 10 insertions, 2 deletions
diff --git a/guix-build.in b/guix-build.in
index 380c203000..f232e13703 100644
--- a/guix-build.in
+++ b/guix-build.in
@@ -130,6 +130,8 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
 
    (setlocale LC_ALL "")
    (textdomain "guix")
+   (setvbuf (current-output-port) _IOLBF)
+   (setvbuf (current-error-port) _IOLBF)
 
    (let* ((opts (parse-options))
           (drv  (filter-map (match-lambda
@@ -174,6 +176,12 @@ Report bugs to: ~a.~%") "@PACKAGE_BUGREPORT@"))
      (or (assoc-ref opts 'dry-run?)
          (and (build-derivations %store drv)
               (for-each (lambda (d)
-                          (display (derivation-path->output-path d))
-                          (newline))
+                          (let ((drv (call-with-input-file d
+                                       read-derivation)))
+                            (format #t "~{~a~%~}"
+                                    (map (match-lambda
+                                          ((out-name . out)
+                                           (derivation-path->output-path
+                                            d out-name)))
+                                         (derivation-outputs drv)))))
                         drv))))))