raco pkg: don't treat "info.rkt" as a conflict

Even though "info.rkt" files are in collections, `raco setup'
treats them in a directory-specific way --- and that's necessary
for specifying things like `compile-omit-files' in a collection
splice.
This commit is contained in:
Matthew Flatt 2013-05-08 18:49:54 -04:00
parent f364871e7c
commit 332c863e78
3 changed files with 27 additions and 15 deletions

View File

@ -1807,21 +1807,30 @@
(define-values (base name dir?) (split-path f))
(cond
[(eq? 'relative base) s]
[(regexp-match? #rx#"[.](?:rkt|ss)$" (path-element->bytes name))
(try-path s f)]
[(regexp-match? #rx#"_(?:rkt|ss)[.]zo$" (path-element->bytes name))
(define-values (dir-base dir-name dir?) (split-path base))
[else
(define bstr (path-element->bytes name))
(cond
[(eq? 'relative dir-base) s]
[(equal? dir-name compiled)
(try-path s (build-path dir-base
(bytes->path-element
(regexp-replace
#rx#"_(?:rkt|ss)[.]zo$"
(path-element->bytes name)
#".rkt"))))]
[else s])]
[else s])]))))
[(or (equal? #"info.rkt" bstr)
(equal? #"info.ss" bstr))
;; don't count "info.rkt" as a conflict, because
;; splices may need their own "info.rkt"s, and
;; `raco setup' can handle that
s]
[(regexp-match? #rx#"[.](?:rkt|ss)$" bstr)
(try-path s f)]
[(regexp-match? #rx#"_(?:rkt|ss)[.]zo$" (path-element->bytes name))
(define-values (dir-base dir-name dir?) (split-path base))
(cond
[(eq? 'relative dir-base) s]
[(equal? dir-name compiled)
(try-path s (build-path dir-base
(bytes->path-element
(regexp-replace
#rx#"_(?:rkt|ss)[.]zo$"
(path-element->bytes name)
#".rkt"))))]
[else s])]
[else s])])]))))
(define (pkg-catalog-update-local #:catalog-file [catalog-file (db:current-pkg-catalog-file)]
#:quiet? [quiet? #f]

View File

@ -29,7 +29,7 @@
(if sep? (cons (mk-sep lbl) l) l))]))))
(define (make-start-page all?)
(let* ([recs (find-relevant-directory-records '(scribblings))]
(let* ([recs (find-relevant-directory-records '(scribblings) 'all-available)]
[infos (map get-info/full (map directory-record-path recs))]
[main-dirs (parameterize ([current-library-collection-paths
(list (find-collects-dir))])

View File

@ -0,0 +1,3 @@
#lang setup/infotab
(define name "Also Data")