cpack.pl -- The ClioPatria package manager
- 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.
- pack_data_url(+NameOrNames, -URL) is nondet[private]
- URL can be tried to obtain information about the requested packages.
- cpack_install_terms(+Terms) is det[private]
- Install from the server reply.
- package_status(+CpackTerm, -Status)[private]
- cpack_download(+Repository, +TargetDir)[private]
- Download Repository to Dir.
- setup_push_for_download(+Dir) is det[private]
- If the downloaded repository can be related to a push-location
based on the current profile, we setup a remote for pushing
changes. This remote has tehe symbolic name
upload
. - cpack_upgrade
- Upgrade all packages to the server versions.
- cpack_upgrade(Package)
- Upgrade Package. This is the same as
cpack_install(Package)
. - cpack_configure(+Name) is det
- Just configure a package.
- cpack_add_dir(+ConfigEnable, +PackageDir)
- Install package located in directory PackageDir.
- add_pack_to_search_path(+PackFile, +Pack, +Dir, -Modified, +Options) is det[private]
- Add a directive as below to PackFile. If PackFile already
contains a declaration for Pack with different attributes, the
file is rewritten using the new attributes.
:- cpack_register(Pack, Dir, Options).
- cpack_remove(+Pack) is det
- 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.
- cpack_unregister(+Pack, +Options) is det[private]
- Remove registration of the given CPACK. This is achieved by
updating 010-
packs.pl
and reloading this file. - remove_config(+Dir, +Options)[private]
- Remove configuration that we loaded from Dir. Currently deletes links and Prolog `link files'.
- remove_dir(+Dir, Options)[private]
- Removes a directory recursively.
- cpack_register(+PackName, +Dir, +Options)
- Attach a CPACK to the search paths
- current_cpack(-Name) is nondet
- True when Name is the name of a registered package.
- cpack_property(Name, Property) is nondet
- True when Property is a property of the CPACK Name. Defined
properties are:
directory(Dir)
- prolog_version:git_module_hook(?Name, ?Directory, ?Options) is nondet[multifile]
- Make packages available for the version management implemented by library(version).
- 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
- git_setup_push(+Dir, +Vars) is det[private]
- Set an origin for the newly created repository. This also tries to setup a bare repository at the remote machine using git_create_origin/2.
- git_create_origin(+Dir, +PushURL, +Title) is det[private]
- Try to create the repository origin. As the user has setup push,
we hope he setup SSH appropriately. Note that this only works if
the remote user has a real shell and not a git-shell.
When using GitHub, PushURL is
git@github.com:<user>/@CPACK@.git https://github.com/<user>/@CPACK@.git
- make_cpack_dir(+BaseDir, +CPACKDir) is det[private]
- Setup th directory structure for a new package.
- cpack_load_profile is det[private]
- Try to load the profile from
user_profile('.cpack.ttl')
. - cpack_load_schema[private]
- Ensure the CPACK schema data is loaded.
- cpack_package_dir(+PackageName, -Dir, +Create)[private]
- Installation directory for Package
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.
- cpack_remove(+Pack) is det
- 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.