PublicShow sourcecpack.pl -- The ClioPatria package manager

Source cpack_install(+Install) is semidet
Install package by name or URL. The URL of a CPACK can be found on the web-page of the package. If a name is given, cpack_install/1 queries the configured servers for the package. For example:
?- cpack_install('EDM').
% Trying CPACK server at http://cliopatria.swi-prolog.org/cpack/EDM ...
% Installing package EDM:
%    EDM -- View Europeana Data Model
% Initialized empty Git repository in /home/jan/tmp/test/cpack/EDM/.git/
%     Installing EDM.pl ...
% /home/jan/tmp/test/config-enabled/010-packs.pl compiled into conf_packs 0.00 sec, 1,480 bytes
% Added the following config files:
%     /home/jan/tmp/test/config-enabled/010-packs.pl
%     /home/jan/tmp/test/config-enabled/EDM.pl
%   library(count) compiled into count 0.02 sec, 13,280 bytes
%  skin(EDM) compiled into edm 0.02 sec, 52,984 bytes
% /home/jan/tmp/test/config-enabled/EDM.pl compiled into conf_EDM 0.02 sec, 56,112 bytes
true.
Arguments:
Install- is either a URL on the server that returns the installation parameter (this is shown in the info box of the package), or the name of a package or a list of package names.
See also
- http://cliopatria.swi-prolog.org is the central package repository.
Source cpack_upgrade
Upgrade all packages to the server versions.
Source cpack_upgrade(Package)
Upgrade Package. This is the same as cpack_install(Package).
Source cpack_configure(+Name) is det
Just configure a package.
Source cpack_add_dir(+ConfigEnable, +PackageDir)
Install package located in directory PackageDir.
To be done
- Register version-tracking with register_git_module/3.
Source cpack_remove(+Pack) is det
Source cpack_remove(+Pack, +Options) is det
Remove CPACK Pack. Processed options:
force(Boolean)
If true, omit checking whether removing the package will break dependencies.
fake(true)
Print messages indicating what actions will be preformed, but do not modify anything.
To be done
- Should we also try to unload all loaded files?
Source cpack_register(+PackName, +Dir, +Options)
Attach a CPACK to the search paths
Source current_cpack(-Name) is nondet
True when Name is the name of a registered package.
Source cpack_property(Name, Property) is nondet
True when Property is a property of the CPACK Name. Defined properties are:
  • directory(Dir)
Source prolog_version:git_module_hook(?Name, ?Directory, ?Options) is nondet[multifile]
Make packages available for the version management implemented by library(version).
Source cpack_create(+Name, +Title, +Options) is det
Create a new package. Options include
type(Type)
Label of a subclass of cpack:Package. Default is package
title(Title)
Title for the package. Should be a short line.
foafname(FoafName)
foaf:name to put into the default template
foafmbox(Email)
foaf:mbox to put into the default template

Default options are extracted from the cpack:Profile named default

To be done
- Allow selection profile, auto-loading of profile, etc.

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

Source cpack_remove(+Pack) is det
Source cpack_remove(+Pack, +Options) is det
Remove CPACK Pack. Processed options:
force(Boolean)
If true, omit checking whether removing the package will break dependencies.
fake(true)
Print messages indicating what actions will be preformed, but do not modify anything.
To be done
- Should we also try to unload all loaded files?