8.15.0.10
7.3 Package Paths and Database🔗ℹ
The
pkg/path library provides
utilities for working with package paths and installed-package
databases.
A structure type that is used to report installed-package information.
The orig-pkg field describes the source of the package as
installed, where 'catalog refers to a package that was
installed by consulting a catalog with a package name, and so on. The
two-element 'catalog form records a URL for a Git or GitHub
package source when the catalog reported such a source, and the URL is
used for operations that adjust 'clone-form installations.
The 'git form is used for URLs that start
git+https:// or git+http:// or where the
'git-url type was specified for parsing the URL. Other Git
references (including ones that start git://) use
'url.
Changed in version 6.1.1.5 of package base: Added 'clone and two-level
'catalog variants for
orig-pkg.
Changed in version 8.0.0.13: Added 'git.
A structure subtype that represents a package that is installed as
single-collection.
Structure subtypes that are used when the installation directory for a
package does not match the package name, but is instead
dir-name. The directory name always includes a +
(which is disallowed in a package name).
Returns the installed package containing path, if any.
If cache is not #f, then it is consulted and
modified to cache installed-package information across calls to
path->pkg (with the assumption that the set of installed
packages does not change across calls that receive the same
cache).
Like
path->pkg, but returns a second value that represents
the remainder of
path within the package’s directory.
Like
path->pkg+subpath, but returns a third value for the package’s
installation scope.
Like
path->pkg+subpath, but returns a third value for a
collection name if the package is a single-collection package,
#f otherwise.
Returns the path of the directory that holds installed packages in the
given scope. The user-version argument is used to generate
the result for 'user scope.
Returns a hash table representing the currently installed packages
in the specified scope.
Reads a hash table from path, logging any errors and
returning an empty hash table if path does not exist or if an
error is encountered.