skip-installed from all scopes, not current (#1361)

closes issue #1115
This commit is contained in:
William J. Bowman 2016-08-19 08:56:12 -04:00 committed by Matthew Flatt
parent 70adb6a502
commit 998bfba4c4
2 changed files with 4 additions and 4 deletions

View File

@ -53,6 +53,7 @@
$ "raco pkg install -u --copy test-pkgs/pkg-test1"
$ "racket -l pkg-test1" =stdout> #rx"main loaded"
$ "raco pkg install -i --copy test-pkgs/pkg-test1"
$ "raco pkg install --skip-installed -u --copy test-pkgs/pkg-test1"
$ "raco pkg remove -i --no-trash pkg-test1" =stdout> "Removing pkg-test1\n"
$ "raco pkg remove --no-trash pkg-test1" =stdout> "Removing pkg-test1\n")

View File

@ -877,9 +877,8 @@
download-printf)
given-descs))
(define db (and (or check-pkg-early?
skip-installed?)
(read-pkg-db)))
(define all-scope-dbs (and skip-installed? (merge-pkg-dbs)))
(define db (and check-pkg-early? (read-pkg-db)))
(define filtered-descs
(remove-duplicates
@ -887,7 +886,7 @@
descs
(filter (lambda (d)
(define pkg-name (desc->name d))
(define i (hash-ref db pkg-name #f))
(define i (hash-ref all-scope-dbs pkg-name #f))
(or (not i) (pkg-info-auto? i)))
descs))
pkg-desc=?))