raco pkg: fix dependency checking for user and shared scopes
This commit is contained in:
parent
47f1b4498f
commit
a89ba74f4e
|
@ -27,6 +27,7 @@
|
|||
$ "racket -e '(require pkg-test2)'" =exit> 1
|
||||
$ "raco pkg install test-pkgs/pkg-test2.zip" =exit> 1
|
||||
$ "raco pkg install test-pkgs/pkg-test1.zip" =exit> 0
|
||||
$ "raco pkg show" =exit> 0
|
||||
$ "raco pkg install test-pkgs/pkg-test2.zip" =exit> 0
|
||||
$ "racket -e '(require pkg-test2)'" =exit> 0
|
||||
$ "racket -e '(require pkg-test2/contains-dep)'" =exit> 0
|
||||
|
|
|
@ -94,7 +94,8 @@
|
|||
$ "racket -e '(require pkg-test1/a)'" =exit> 1
|
||||
$ "racket -e '(require pkg/lib)' -e '(path->pkg \"test-pkgs/pkg-test1-linking\")'" =stdout> "\"pkg-test1-linking\"\n"
|
||||
$ "racket -e '(require pkg/lib)' -e '(path->pkg \"test-pkgs/pkg-test1-linking/README\")'" =stdout> "\"pkg-test1-linking\"\n"
|
||||
$ "racket -e '(require pkg/lib)' -e '(path->pkg \"test-pkgs\")'" =stdout> "#f\n"
|
||||
$ "racket -e '(require pkg/lib)' -e '(path->pkg \"test-pkgs\")'" =stdout> "\"racket-test\"\n"
|
||||
$ "racket -e '(require pkg/lib)' -e '(path->pkg (collection-file-path \"main.rkt\" \"racket\"))'" =stdout> "#f\n"
|
||||
$ "cp test-pkgs/pkg-test1-staging/a.rkt test-pkgs/pkg-test1-linking/pkg-test1/a.rkt"
|
||||
$ "racket -e '(require pkg-test1/a)'"
|
||||
$ "rm -f test-pkgs/pkg-test1-linking/pkg-test1/a.rkt"
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
(check-equal-values? (package-source->name+type "fish" 'dir) (values "fish" 'dir))
|
||||
(check-equal-values? (package-source->name+type "fish!/" 'dir) (values #f 'dir))
|
||||
|
||||
(check-equal? (package-source->name "http://") #f))
|
||||
(check-equal? (package-source->name "http://") #f)
|
||||
|
||||
(check-equal-values? (package-source->name+type "http://racket-lang.org/fish.plt" #f) (values "fish" 'file-url))
|
||||
(check-equal-values? (package-source->name+type "https://racket-lang.org/fish.plt" #f) (values "fish" 'file-url))
|
||||
|
|
|
@ -440,11 +440,11 @@
|
|||
(values k v))]
|
||||
[(shared)
|
||||
(define db (read-pkg-db))
|
||||
(for/fold ([ht (merge-next-pkg-dbs 'installation)]) ([(v k) (in-hash db)])
|
||||
(for/fold ([ht (merge-next-pkg-dbs 'installation)]) ([(k v) (in-hash db)])
|
||||
(hash-set ht k v))]
|
||||
[(user)
|
||||
(define db (read-pkg-db))
|
||||
(for/fold ([ht (merge-next-pkg-dbs 'shared)]) ([(v k) (in-hash db)])
|
||||
(for/fold ([ht (merge-next-pkg-dbs 'shared)]) ([(k v) (in-hash db)])
|
||||
(hash-set ht k v))])))
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user