raco pkg show: note when auto-installed packages are not shown

Otherwise, imagine uninstalling packages without `--auto', using `raco
pkg show' to confirm that none are left, and be surprised by a later
error about installed packages.
This commit is contained in:
Matthew Flatt 2013-08-16 13:47:03 -06:00
parent 6b8d84c745
commit 6fc868d5b9

View File

@ -1731,6 +1731,7 @@
(define pkgs (sort (hash-keys db) string-ci<=?))
(if (null? pkgs)
(printf " [none]\n")
(begin
(table-display
(list*
(append
@ -1755,7 +1756,16 @@
(format "~a" orig-pkg))
(if dir?
(list (~a (pkg-directory* pkg #:db db)))
empty))))))))
empty)))))
(unless show-auto?
(define n (for/sum ([pkg (in-list pkgs)]
#:when (pkg-info-auto? (hash-ref db pkg)))
1))
(unless (zero? n)
(printf "~a[~a auto-installed package~a not shown]\n"
indent
n
(if (= n 1) "" "s"))))))))
(define (installed-pkg-table #:scope [given-scope #f])
(parameterize ([current-pkg-scope