raco setup: allow an installer only in bytecode form

This commit is contained in:
Matthew Flatt 2013-09-19 10:51:55 -05:00
parent 68c4b0590d
commit 5ccc6fb289

View File

@ -788,8 +788,9 @@
(unless (relative-path-string? v)
(error "result is not a relative path string: " v))
(define p (build-path (cc-path cc) v))
(unless (file-exists? p)
(error "installer file does not exist: " p)))))
(unless (or (file-exists? p)
(bytecode-file-exists? p))
(error "installer file does not exista: " p)))))
(define installer
(with-handlers ([exn:fail?
(lambda (exn)
@ -817,6 +818,11 @@
[else
(installer dir)]))))))
(define (bytecode-file-exists? p)
(let-values ([(base name dir?) (split-path p)])
(define zo (build-path base mode-dir (path-add-suffix name #".zo")))
(file-exists? zo)))
(define (this-platform? info)
(define sys
(call-info info