raco pkg update: don't claim conflict with package being updated
Merge to v6.1
This commit is contained in:
parent
b5e7fa3434
commit
d2a8bfcfe6
|
@ -113,6 +113,17 @@
|
|||
(shelly-case
|
||||
"no conflict for non-matching platform"
|
||||
$ "raco pkg install --copy --strict-doc-conflicts test-pkgs/pkg-add-base test-pkgs/pkg-add-none"))
|
||||
(shelly-case
|
||||
"no doc conflict for an update"
|
||||
(for ([c '("test-pkgs/pkg-add-base"
|
||||
"test-pkgs/pkg-add-a"
|
||||
"test-pkgs/pkg-add-x"
|
||||
"test-pkgs/pkg-add-1")])
|
||||
(with-fake-root
|
||||
(shelly-begin
|
||||
$ "raco pkg install --copy test-pkgs/pkg-add-base"
|
||||
$ "raco setup -D --pkgs pkg-add-base"
|
||||
$ (~a "raco pkg update --copy --name pkg-add-base " c) =exit> 0))))
|
||||
|
||||
(shelly-case
|
||||
"compile-omit-paths is used by `pkg-directory->additional-installs`:"
|
||||
|
|
|
@ -1674,7 +1674,12 @@
|
|||
(eq? (car ai) 'doc)
|
||||
(eq? (current-pkg-scope) 'user))
|
||||
#f]
|
||||
[(set-member? (get-additional-installed (car ai) ai-cache metadata-ns) ai)
|
||||
[(set-member? (get-additional-installed (car ai)
|
||||
simultaneous-installs
|
||||
ai-cache
|
||||
metadata-ns
|
||||
path-pkg-cache)
|
||||
ai)
|
||||
;; This item is already installed
|
||||
(cons #f ai)]
|
||||
[else
|
||||
|
@ -3388,9 +3393,10 @@
|
|||
(extract-man-pages i))
|
||||
(set))))
|
||||
|
||||
(define (get-additional-installed kind ai-cache metadata-ns)
|
||||
(define (get-additional-installed kind skip-ht-keys ai-cache metadata-ns path-pkg-cache)
|
||||
(or (unbox ai-cache)
|
||||
(let ()
|
||||
(define skip-pkgs (list->set (hash-keys skip-ht-keys)))
|
||||
(define dirs (find-relevant-directories '(scribblings
|
||||
racket-launcher-names
|
||||
mzscheme-launcher-names
|
||||
|
@ -3406,10 +3412,14 @@
|
|||
'all-available
|
||||
'no-user)))
|
||||
(define s (for/fold ([s (set)]) ([dir (in-list dirs)])
|
||||
(define i (get-pkg-info dir metadata-ns))
|
||||
(if i
|
||||
(set-union s (extract-additional-installs i #f #f))
|
||||
s)))
|
||||
(cond
|
||||
[(set-member? skip-pkgs (path->pkg dir #:cache path-pkg-cache))
|
||||
s]
|
||||
[else
|
||||
(define i (get-pkg-info dir metadata-ns))
|
||||
(if i
|
||||
(set-union s (extract-additional-installs i #f #f))
|
||||
s)])))
|
||||
(set-box! ai-cache s)
|
||||
s)))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user