pkg/db: make local package database's path relative to installation name

Instead of `(version)`, use `(get-installation-name)` for the path
of the local database used by the GUI package manager.
This commit is contained in:
Matthew Flatt 2014-05-29 13:41:43 +01:00
parent f6a43b6b5d
commit 3392ca36f7
2 changed files with 7 additions and 4 deletions

View File

@ -2,7 +2,8 @@
@(require (for-label racket/base
racket/contract/base
pkg/db
syntax/modcollapse))
syntax/modcollapse
setup/dirs))
@title[#:tag "db"]{Package Catalog Database}
@ -40,8 +41,9 @@ strings. Otherwise, unknown fields are represented by empty strings.}
@defparam[current-pkg-catalog-file file path-string?]{
A parameter that determines the file path used to hold the SQLite
database. The default value is in the user's add-on directory and in
a version-specific subdirectory.}
database. The default value is in the user's add-on directory as
determined by @racket[(find-system-path 'addon-dir)] and within a
subdirectory determined by @racket[get-installation-name].}
@deftogether[(

View File

@ -5,6 +5,7 @@
racket/path
racket/file
version/utils
setup/dirs
db/private/pre)
(provide
@ -120,7 +121,7 @@
(define current-pkg-catalog-file
(make-parameter (build-path
(find-system-path 'addon-dir)
(version)
(get-installation-name)
"pkgs"
"catalog.sqlite")))