category

packs_common

Common predicates for the packs tool objects.

Author: Paulo Moura
Version: 0:17:0
Date: 2021-10-25
Compilation flags:
static
Uses:
Remarks:
(none)
Inherited public predicates:
(none)

Public predicates

setup/0

Setup registries and packs directory structure.

Compilation flags:
static
Mode and number of proofs:
setup - one

verify_commands_availability/0

Verify required shell commands availability. Fails printing an error message if a command is missing.

Compilation flags:
static
Mode and number of proofs:
verify_commands_availability - zero_or_one

help/0

Provides help about the main predicates.

Compilation flags:
static
Mode and number of proofs:
help - one

pin/1

Pins a resource (pack or registry) preventing it from being updated, uninstalled, or deleted. Fails if the resource is not found.

Compilation flags:
static
Template:
pin(Resource)
Mode and number of proofs:
pin(+atom) - zero_or_one

unpin/1

Unpins a resource (pack or registry), allowing it to be updated, uninstalled, or deleted. Fails if the resource is not found.

Compilation flags:
static
Template:
unpin(Resource)
Mode and number of proofs:
unpin(+atom) - zero_or_one

pinned/1

True iff the resource (pack or registry) is defined or installed and if it is pinned.

Compilation flags:
static
Template:
pinned(Resource)
Mode and number of proofs:
pinned(+atom) - zero_or_one

directory/2

Enumerates by backtracking all packs or registries and respective installation or definition directories.

Compilation flags:
static
Template:
directory(Resource,Directory)
Mode and number of proofs:
directory(?atom,?atom) - zero_or_more

directory/1

Returns the directory where the registries or the packs are installed.

Compilation flags:
static
Template:
directory(Directory)
Mode and number of proofs:
directory(?atom) - zero_or_one

readme/2

Returns the path to the resource (pack or registry) readme file. Fails if the resource is not defined or installed or if no readme file is found for it.

Compilation flags:
static
Template:
readme(Resource,ReadMeFile)
Mode and number of proofs:
readme(+atom,-atom) - zero_or_one

Protected predicates

readme_file_path/2

Returns the absolute path for the given directory readme file if it exists.

Compilation flags:
static
Template:
readme_file_path(Directory,ReadMeFile)
Mode and number of proofs:
readme_file_path(+atom,-atom) - zero_or_one

command/2

Executes a shell command. Prints an error message and fails if the command fails.

Compilation flags:
static
Template:
command(Command,FailureMessage)
Mode and number of proofs:
command(+atom,@nonvar) - zero_or_one

load_registry/1

Loads all registry files from the given directory.

Compilation flags:
static
Template:
load_registry(Directory)
Mode and number of proofs:
load_registry(+atom) - zero_or_one

tar_command/1

Returns the name of the tar command to be used depending on the operating-system.

Compilation flags:
static
Template:
tar_command(Command)
Mode and number of proofs:
tar_command(-atom) - one

supported_archive/1

True iff the archive format is supported.

Compilation flags:
static
Template:
supported_archive(Extension)
Mode and number of proofs:
supported_archive(+atom) - zero_or_one

Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)