From 23dc67c1a4a29051c8398d145dd6b027a634d1c5 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 22 Feb 2021 19:24:15 -0700 Subject: [PATCH] unixstyle install: fix when "share/pkgs" is not created --- racket/collects/setup/unixstyle-install.rkt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/racket/collects/setup/unixstyle-install.rkt b/racket/collects/setup/unixstyle-install.rkt index 7dff9bfbbb..213dc42dd0 100644 --- a/racket/collects/setup/unixstyle-install.rkt +++ b/racket/collects/setup/unixstyle-install.rkt @@ -60,8 +60,8 @@ [(sharerkt) "share"] [(config) "etc"] [(collects) "collects"] - [(pkgs) "share/pkgs"] - [(apps) "share/applications"] + [(pkgs) (build-path "share" "pkgs")] + [(apps) (build-path "share" "applications")] [else (symbol->string name)]))) (define dirs (map (lambda (name) (list name (if base-destdir @@ -157,9 +157,10 @@ (skip-filter f))))) (define (add-pkgs-skip skip-filter) - (lambda (f) - (or (equal? f "share/pkgs") - (skip-filter f)))) + (let ([share/pkgs (make-path "share" "pkgs")]) + (lambda (f) + (or (equal? f share/pkgs) + (skip-filter f))))) ;; copy a file or a directory (recursively), preserving time stamps ;; (racket's copy-file preservs permission bits) @@ -533,7 +534,7 @@ ;; All other platforms use "bin": (do-tree "bin" 'bin)) (do-tree "collects" 'collects) - (do-tree "share/pkgs" 'pkgs) + (do-tree (make-path "share" "pkgs") 'pkgs #:missing 'skip) (do-tree "doc" 'doc #:missing 'skip) ; not included in text distros (do-tree "lib" 'librkt) (do-tree "include" 'includerkt) @@ -583,7 +584,7 @@ (with-handlers ([exn? (lambda (e) (undo-changes) (raise e))]) (set! yes-to-all? #t) ; non-interactive (copytree "collects" 'collects) - (copytree "share/pkgs" 'pkgs #:missing 'skip) + (copytree (make-path "share" "pkgs") 'pkgs #:missing 'skip) (parameterize ([current-skip-filter (add-pkgs-skip (current-skip-filter))]) (copytree "share" 'sharerkt #:missing 'skip)) (copytree "doc" 'doc #:missing 'skip)