From 1b890c39ee8ca06ae96f22166a75fccba2f5146e Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 18 May 2015 18:51:24 -0600 Subject: [PATCH] raco setup: fix shared-file cleanup on uninstall The tidying step of `raco setup` looked for the "shares.rktd" receipt file in the wrong directory. (cherry picked from commit 235bd4de8f3e57b7579fb3125997ceac6a40b605) --- racket/collects/setup/setup-core.rkt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/racket/collects/setup/setup-core.rkt b/racket/collects/setup/setup-core.rkt index 48e4cde39a..d294b20129 100644 --- a/racket/collects/setup/setup-core.rkt +++ b/racket/collects/setup/setup-core.rkt @@ -1658,13 +1658,17 @@ (unless (avoid-main-installation) (tidy-libs #f (find-target-dir) - (find-lib-dir) + (if receipt-at-dest? + (find-target-dir) + (find-lib-dir)) installed-libs ccs-to-compile)) (when (make-user) (tidy-libs #t (find-user-target-dir) - (find-user-lib-dir) + (if receipt-at-dest? + (find-user-target-dir) + (find-user-lib-dir)) installed-libs ccs-to-compile))) (for-each fixup-lib (hash-keys dests))) @@ -1713,9 +1717,9 @@ (write-receipt-hash receipt-path ht))) lib-key)) - (define (tidy-libs user? target-dir lib-dir installed-libs ccs-to-compile) - (clean-previous-delete-failures lib-dir path->relative-string/*) - (define receipt-path (build-path lib-dir receipt-file)) + (define (tidy-libs user? target-dir receipt-dir installed-libs ccs-to-compile) + (clean-previous-delete-failures receipt-dir path->relative-string/*) + (define receipt-path (build-path receipt-dir receipt-file)) (define ht (read-receipt-hash receipt-path)) (define ht2 (for/fold ([ht (hash)]) ([(k v) (in-hash ht)]) (define coll-path (and (pair? v)