Script Index


/var/lib/sorcery/modules/libstate

Handles storage of state information, incluing depends and package files. Also handles looking information up about what is installed and what depends on what.


function add_depends()

Parameters:

Example

add_depends kdelibs alsa-driver on optional --with-alsa --without-alsa

Description

Adds a dependency to the a depends database file. Returns 1 if the 3rd or 4th fields are not valid.


function search_depends_status_exact()

Parameters:

Returns:

Stdout

the matching line(s)

Description

In case you want to search in all the fields of the $1 Arguments can be regexp Prints out the matching line(s)


function search_depends_status_simple()

Parameters:

Stdout

the matching line(s)

Description

Search depends status, dont do anything escaping. Arguments can be regexp Prints out the matching line(s)


function search_depends_status()

Parameters:

Stdout

matching lines

Description

In case you want to search by spell or dependency in $1 Arguments can be regexp Prints out the matching line(s)


function get_depends_options()

Parameters:

Stdout

list of options

Description

Returns a list of options for ./configure from $1 Primarily aimed at generating $OPTS contents Prints out one line of output


function remove_depends_status()

Parameters:

Description

Arguments can be regexp, and all but the spell are optional


function toggle_depends_status()

Parameters:

Description

Toggle optional and suggested dependencies on/off


function change_spell_provider()

Parameters:

Description

Changes the $spell's provider of $feature to a $new one. Can also toggle it to be enabled or disabled.


function get_uncommitted_depends_file()

Parameters:

Description

Sets up the uncommitted depends file. If the name isn't found in the hash table create it. If the file already exists move it to the abandoned depends directory and start with a new one. The uncommitted_hash hash table should be hash_export'ed to make it through the call to make.


function get_uncommitted_sub_depends_file()

Parameters:

Description

Get the uncommitted sub-depends file. Uses get_uncommitted_depends_file. This file is intended for use by the sub-dependee.


function get_uncommitted_rsub_depends_file()

Parameters:

Description

Get the uncommitted sub-depends file. Uses get_uncommitted_depends_file This file is intended for use by the requester.


function add_sub_depends()

Parameters:

Description

Add a sub-dependency.


function search_sub_depends()

Parameters:

Description

Search in sub-depends file.


function remove_sub_depends()

Parameters:

Description

Remove a sub-depends.


function add_default_depends()

Parameters:

Description

add default depends entry, if $3 is a spell $4 must be on/off if $3 is a PROVIDER $4 must be a spell


function remove_default_depends()

Parameters:

Description

Arguments can be regexp, $2, $3 and $4 are optional Caller must lock the file


function search_default_depends()

Parameters:

Description

Arguments can be regexp, $2 $3 and $4 are optional


function add_default_provider()

Parameters:

Description

Arguments can be regexp, $3 and $4 are optional


function remove_version_cache()

Parameters:

Description

Removes the spell info from the passed file ($VERSION_STATUS)


function add_version_cache()

Parameters:

Description

Given a spell and the factors that affect queuing, this function adds the info to the passed file (usually $VERSION_STATUS)


function add_spell_status()

Parameters:

Description

Adds an entry to the SPELL_STATUS file Arguments may either be SPELL, ACTION, VERSIONS, or just ACTION if there exists SPELL and VERSIONS variables already set.


function add_spell()

Parameters:

Description

Given a spell, status (installed, held, etc), and version, add_spell adds the spell to the /var/state/sorcery/packages file


function search_spell_status()

Parameters:

Stdout

matching lines

Description

Arguments can be regexp Prints out the matching line(s)


function query_spell_status()

Parameters:

Returns:

Stdout

last matching line ( only one even if there are more )

Description

Searches the SPELL_STATUS file for a spell and optionally a version. Prints out the matching spell's status


function real_spell_installed()

Parameters:

Returns:

Type

API


function real_spell_held()

Parameters:

Returns:


function real_spell_ok()

Parameters:

Returns:

Type

API


function real_provider_ok()

Parameters:

Returns:

Type

API


function real_get_spell_provider()

Parameters:

Returns:

Type

API

stdout

the provider name(s)


function real_is_depends_enabled()

Parameters:

Returns:

Type

API

stdout

the provider name(s)


function real_spell_exiled()

Parameters:

Returns:


function remove_spell_status()

Parameters:

Description

Removes all specified offending entries in SPELL_STATUS


function remove_spell()

Parameters:

Description

Removes the given spell from the /var/state/sorcery/packages file. if C is set, the spell is changed to "exiled" in the file.


function all_spell_status()

Parameters:

Stdout

All spell stati

Description

Just here to round out the SPELL_STATUS functions so that SPELL_STATUS doesn't have to mentioned in libsorcery


function set_held()

Parameters:

Description

sets <spells>'s status to held


function set_exiled()

Parameters:

Description

sets <spells>'s status to exiled


function set_unexiled()

Parameters:

Description

resets 's 'exiled' status


function set_unheld()

Parameters:

Description

sets 's status to installed


function get_all_spells_with_status()

Parameters:

Stdout

spells

Description

returns all spells that are in that status


function modify_local_config()

Parameters:

Description

Modifies (or adds) an entry in the local/config. If "command" is the third argument, a space will separate the variable and value rather than the equals sign.


function modify_config()

Parameters:

Description

Modifies (or adds) an entry in the local/config. If "command" is the third argument, a space will separate the variable and value rather than the equals sign.


function remove_config()

Parameters:

Description

Removes an entry in the local/config. If "command" is the third argument, a space will separate the variable and value rather than the equals sign.