raco setup: fix the way that "stamp" is compiled for avoided files

Instead of claiing "beginning of time" and an empty SHA1, use
`file-stamp-in-paths` to get a proper stamp.

This fixes a problem when installing built packages into user scope
where the built packages refers to an installation-scope library
and SHA1s need to be checked to fix up file timestamps.
This commit is contained in:
Matthew Flatt 2014-02-15 14:45:14 -07:00
parent 7b4ea16bc0
commit 5ada90bfd2

View File

@ -114,12 +114,18 @@
[manager-skip-file-handler
(lambda (path)
(and (pair? skip-paths)
(let ([b (path->bytes (simplify-path path #f))])
(let* ([simp-path (simplify-path path #f)]
[b (path->bytes simp-path)])
(for/or ([skip-path (in-list skip-paths)])
(let ([len (bytes-length skip-path)])
(and ((bytes-length b) . > . len)
(bytes=? (subbytes b 0 len) skip-path)
(cons -inf.0 "")))))))])
(let-values ([(base name dir?) (split-path simp-path)])
(or (and (path? base)
;; Compute the stamp:
(file-stamp-in-paths simp-path (list base)))
;; This shouldn't happen, but just in case:
(cons -inf.0 "")))))))))])
(let* ([sses (append
;; Find all .rkt/.ss/.scm files:
(filter extract-base-filename/ss (directory-list))