raco pkg: fix conflict checking for a collection splice
Package updating also seems to have been broken by roughly the same code (so maybe I ran the test suite incorrectly before?). Closes PR 13736
This commit is contained in:
parent
89f9b860cd
commit
2841e873e1
|
@ -992,10 +992,12 @@
|
|||
(or (file-exists? f)
|
||||
(file-exists? (path-replace-suffix f #".ss"))
|
||||
(let-values ([(base name dir?) (split-path f)])
|
||||
(or (file-exists? (build-path base "compiled" (path-add-suffix f #".zo")))
|
||||
(or (file-exists? (build-path base "compiled" (path-add-suffix name #".zo")))
|
||||
(file-exists? (build-path base "compiled" (path-add-suffix
|
||||
(path-replace-suffix f #".ss")
|
||||
#".zo")))))))
|
||||
(path-replace-suffix name #".ss")
|
||||
#".zo"))))))
|
||||
(or (not updating?)
|
||||
(not (equal? pkg-name (path->pkg f)))))
|
||||
;; This module is already installed
|
||||
(cons (path->pkg f) mp)]
|
||||
[else
|
||||
|
|
|
@ -33,9 +33,11 @@
|
|||
(get-pkg-content (pkg-desc "http://localhost:9999/pkg-test1.zip" #f #f #f)))
|
||||
|
||||
(check-equal? cksum cksum1)
|
||||
(check-equal? mods '((lib "pkg-test1/conflict.rkt")
|
||||
(lib "pkg-test1/main.rkt")
|
||||
(lib "pkg-test1/update.rkt")))
|
||||
(check-equal? (sort mods string<? #:key cadr)
|
||||
'((lib "data/empty-set.rkt")
|
||||
(lib "pkg-test1/conflict.rkt")
|
||||
(lib "pkg-test1/main.rkt")
|
||||
(lib "pkg-test1/update.rkt")))
|
||||
(check-equal? deps '())
|
||||
|
||||
(define-values (cksum2 mods2 deps2)
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#lang racket/base
|
||||
|
||||
(define empty-set '())
|
||||
|
||||
;; This module tests splicing into an existing collection
|
||||
;; (and the associated conflict checking).
|
Loading…
Reference in New Issue
Block a user