From 10a931d68850355d21363adbed9a998a4150fd9d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 17 Sep 2013 13:07:39 -0600 Subject: [PATCH] fixup for showing dependencies during update --- .../racket-pkgs/racket-test/tests/pkg/tests-deps.rkt | 2 +- racket/collects/pkg/lib.rkt | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/racket-pkgs/racket-test/tests/pkg/tests-deps.rkt b/pkgs/racket-pkgs/racket-test/tests/pkg/tests-deps.rkt index 9fc73c139e..91f2fbaef4 100644 --- a/pkgs/racket-pkgs/racket-test/tests/pkg/tests-deps.rkt +++ b/pkgs/racket-pkgs/racket-test/tests/pkg/tests-deps.rkt @@ -108,7 +108,7 @@ $ "racket -e '(require pkg-test2)'" =exit> 1 $ "raco pkg install --deps search-auto test-pkgs/pkg-test2.zip" =exit> 0 - =stdout> "Resolving \"pkg-test1\" via http://localhost:9990\nDownloading checksum for pkg-test1\nDownloading http://localhost:9999/pkg-test1.zip\nThe following uninstalled packages were listed as dependencies\nand they were automatically installed:\ndependencies of pkg-test2:\n pkg-test1\n" + =stdout> "Resolving \"pkg-test1\" via http://localhost:9990\nDownloading checksum for pkg-test1\nDownloading http://localhost:9999/pkg-test1.zip\nThe following uninstalled packages were listed as dependencies\nand they were automatically installed:\n dependencies of pkg-test2:\n pkg-test1\n" =stderr> "" $ "racket -e '(require pkg-test2)'" =exit> 0 $ "racket -e '(require pkg-test2/contains-dep)'" =exit> 0 diff --git a/racket/collects/pkg/lib.rkt b/racket/collects/pkg/lib.rkt index 21696e9682..a870ea9d53 100644 --- a/racket/collects/pkg/lib.rkt +++ b/racket/collects/pkg/lib.rkt @@ -1220,12 +1220,16 @@ (define (format-deps update-deps) (format-list (for/list ([ud (in-list update-deps)]) - (if (pkg-desc? ud) - (pkg-desc-name ud) + (cond + [(pkg-desc? ud) + (pkg-desc-name ud)] + [(string? ud) + ud] + [else (format "~a (have ~a, need ~a)" (car ud) (caddr ud) - (cadddr ud)))))) + (cadddr ud))])))) (define (install-packages #:old-infos old-infos @@ -1799,7 +1803,7 @@ (string-append* (for/list ([p*ds (in-list summary-deps)]) (match-define (vector n ds) p*ds) - (format "\ndependencies of ~a:~a" + (format "\n dependencies of ~a:~a" n (if updating? (format-deps ds)