pkg/lib: lock clean-up, and add `path->pkg'
Make the installed-package database lock reentrant, change some
functions to take the lock, and fix the documentation on when a
lock is expected to be taken outside of functions.
original commit: 10e53e3bf4
This commit is contained in:
parent
77833ba35b
commit
4af90112d0
|
@ -108,12 +108,9 @@
|
|||
[l
|
||||
(for-each do-test l)])]
|
||||
[packages?
|
||||
(unless (for*/or ([scope (in-list '(installation user shared))])
|
||||
(define pd
|
||||
(parameterize ([current-pkg-scope scope])
|
||||
(with-handlers ([exn:fail? (λ (x) #f)])
|
||||
(pkg-directory e))))
|
||||
(and pd (do-test pd)))
|
||||
(define pd (pkg-directory e))
|
||||
(if pd
|
||||
(do-test pd)
|
||||
(error 'test "Package ~e is not installed" e))]
|
||||
[else
|
||||
(do-test e)]))
|
||||
|
|
Loading…
Reference in New Issue
Block a user