raco pkg: fix conflict checking for PLTCOMPILEDROOTS

The fix is for a corner case that is unlikely to show up,
but the repaired code is simpler.
This commit is contained in:
Matthew Flatt 2014-06-02 16:41:28 +01:00
parent 13c53a23e3
commit c1c12b05f5

View File

@ -28,6 +28,7 @@
version/utils version/utils
syntax/modcollapse syntax/modcollapse
syntax/modread syntax/modread
compiler/compilation-path
"name.rkt" "name.rkt"
"util.rkt" "util.rkt"
"strip.rkt" "strip.rkt"
@ -1565,11 +1566,8 @@
[(and f [(and f
(or (file-exists? f) (or (file-exists? f)
(file-exists? (path-replace-suffix f #".ss")) (file-exists? (path-replace-suffix f #".ss"))
(let-values ([(base name dir?) (split-path f)]) (file-exists? (get-compilation-bytecode-file f))
(or (file-exists? (build-path base "compiled" (path-add-suffix name #".zo"))) (file-exists? (get-compilation-bytecode-file (path-replace-suffix f #".ss"))))
(file-exists? (build-path base "compiled" (path-add-suffix
(path-replace-suffix name #".ss")
#".zo"))))))
(or (not updating?) (or (not updating?)
(not (equal? pkg-name (path->pkg f #:cache path-pkg-cache))))) (not (equal? pkg-name (path->pkg f #:cache path-pkg-cache)))))
;; This module is already installed ;; This module is already installed