From a07e9733162cb3757614bb360cb072d352234cc9 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 27 Sep 2019 06:43:53 -0600 Subject: [PATCH] raco setup: accomodate unusual flie names in pkg-dep checking If a source file name lacks an extension, then the pkg-step would get confused trying to convert a ".zo" name back to a source name. The original name is not really needed, anyway. --- racket/collects/setup/private/pkg-deps.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/racket/collects/setup/private/pkg-deps.rkt b/racket/collects/setup/private/pkg-deps.rkt index c18f2bdf92..16e6229c80 100644 --- a/racket/collects/setup/private/pkg-deps.rkt +++ b/racket/collects/setup/private/pkg-deps.rkt @@ -365,7 +365,9 @@ (when (file-exists? (build-path dir zo-f)) (define base (let ([m (regexp-match #rx#"^(.*)_[^_]+[.]zo$" (path-element->bytes zo-f))]) - (and m (bytes->string/utf-8 (cadr m))))) + (or (and m (bytes->string/utf-8 (cadr m))) + ;; In case the original file name had no suffix: + "unknown"))) (define in-mod `(lib ,(string-join (append (map path-element->string coll-path) (list base)) "/")))