- See also
- Installed packages can be inspected using
- To be done
- - Version logic
- Find and resolve conflicts
- Upgrade git packages
- Validate git packages
- Test packages: run tests from directory‘test'.
library(prolog_pack) provides the SWI-Prolog package
manager. This library lets you inspect installed packages, install
packages, remove packages, etc. It is complemented by the built-in attach_packs/0
that makes installed packages available as libraries.
- List currently installed packages. Unlike pack_list/1,
only locally installed packages are displayed and no connection is made
to the internet.
- See also
- Use pack_list/1
to find packages.
- Print more detailed information about Pack.
- Query package server and installed packages and display
Query is matches case-insensitively against the name and
title of known and installed packages. For each matching package, a
single line is displayed that provides:
- Installation status
- p: package, not installed
- i: installed package; up-to-date with public version
- U: installed package; can be upgraded
- A: installed package; newer than publically available
- l: installed package; not on server
?- pack_list(''). lists all packages.
The predicates pack_list/1
are synonyms. Both contact the package server at http://www.swi-prolog.org
to find available packages.
- See also
to list installed packages without contacting the server.
- Install a package. Spec is one of
- Archive file name
- HTTP URL of an archive file name. This URL may contain a star (*)
for the version. In this case pack_install asks for the directory
content and selects the latest version.
- GIT URL (not well supported yet)
- A local directory name given as
file:// URL or
- A package name. This queries the package repository at http://www.swi-prolog.org
After resolving the type of package, pack_install/2
is used to do the actual installation.
- Install package Name. Processes the options below. Default
options as would be used by pack_install/1
are used to complete the provided Options.
- Source for downloading the package
- Directory into which to install the package.
true, install in the XDG common application data path,
making the pack accessible to everyone. If
in the XDG user application data path, making the pack accessible for
the current user only. If the option is absent, use the first existing
and writable directory. If that doesn't exist find locations where it
can be created and prompt the user to do so.
- Use default answer without asking the user if there is a default action.
true (default false), suppress informational progress
false), upgrade package if it
is already installed.
- Rebuild the foreign components. Condition is one of
if_absent (default, do nothing if the directory with
foreign resources exists),
(run‘make distclean` followed by the default configure and build
true (default), run the pack tests.
false unless URL
ends with =.git=), assume the URL is a GIT repository.
- Can be used if the installation source is a local directory and the file
system supports symbolic links. In this case the system adds the current
directory to the pack registration using a symbolic link and performs
the local installation steps.
Non-interactive installation can be established using the option
interactive(false). It is adviced to install from a
trusted URL instead of the plain pack name for unattented
- True if File is a unique id for the referenced pack and
version. Normally, that is simply the base name, but GitHub archives
destroy this picture. Needed by the pack manager.
+ProblemCert, +AllCerts, +FirstCert, +Error)
- Currently we accept all certificates. We organise our own security using
SHA1 signatures, so we do not care about the source of the data.
- Rebuilt possible foreign components of Pack.
- Rebuild foreign components of all packages.
- Try to upgrade the package Pack.
- To be done
- Update dependencies when updating a pack from git?
- Remove the indicated package.
- True when Property is a property of an installed Pack.
This interface is intended for programs that wish to interact with the
package manager. Defined properties are:
- Directory into which the package is installed
- Installed version
- Full title of the package
- Registered author
- Official download URL
README file (if present)
TODO file (if present)
- Translate between atomic version representation and term representation.
The term representation is a list of version components as integers and
can be compared using
- Attach a single package in Dir. The Dir is
expected to contain the file
pack.pl and a
directory. Options processed:
- What to do if the same package is already installed in a different
directory. Action is one of
- Warn and ignore the package
- Silently ignore the package
- Unregister the existing and insert the new package
- Determines the order of searching package library directories. Default
last, alternative is
- See also
- attach_packs/2 to
attach multiple packs from a directory.