Script Index


/usr/sbin/cleanse

This script should clean up the sorcery files, particularly the depends and packages files. It should validate the files remove corrupted lines, and ensure the information all agrees with itself. It is also to clean out unused lines and files.

Licence

Relased under the GNU GPL version 2


function usage()

Parameters:

Stdout

Usage statement

Description

Gives the usage of this script


function args()

Parameters:

Args

--help Display help --delint [full] Find stale dependency entries, with full it'll look at off entries too --prune [doit] Find missing spells, do the actions of "doit" is specified --packages Find packages entries that are corrupted, or non-existant --tablet Clean up the tablet --logs Remove stale logs --sweep Remove uneeded spool and cache files --sweep_all Remove uneeded spool and cache files --fix Find binaries that are missing libs and files, and recast broken spells --nofix Same as --fix, but won't recast. --nofix_quick Same as --nofix, but doesn't check dependent spells

args

--tablet_spell Clean up the tablet for one spell

Description

Interpret the arguments to this script


function delint()

Parameters:

Stdin

Answers to questions

Stdout

Misc output and questions

Description

Find stale dependency entries, with full it'll look at off entries too


function prune_depends()

Parameters:

Stdin

responses to queries

Stdout

questions about what to do about problems

Description

Find missing spells, do the actions of "doit" is specified


function packages()

Parameters:

Stdout

Misc status output

Description

Find packages entries that are corrupted, or non-existant


function cleanse_fix()

Parameters:

Args

[nofix] [spell [spell [...]]]

Returns

May return non zero if there was a problem.

Description

Checks and fixes a list of spells. If no spells are specified, then all installed spells are checked. If the first arg is 'nofix', then no fixing will be done Just error detection


function cleanse_fix_spell()

Parameters:

Returns:

Description

cast a spell and recheck it to see if its actually fixed we assume in this case that all its dependents are fixed/hopeless if the spell cannot be fixed we complain and append it to the HOPELESS list


function cleanse_fix_run_checks()

Parameters:

Returns:

args

Spell [check nr,total nr]

Description

Run the checks on a spell.


function cleanse_fix_find_check()

Parameters:

Returns:

FIXME

The skipped directories should be made configurable somewhere

Description

Check that all files installed still exist.


function cleanse_fix_init_ldd_check()

Parameters:

Description

Initialize the ldd check, builds up a hash table in ldd_hash of what library directories a spell has libraries in, this is because some spells have their own private libraries and arent happy if they dont know where they are


function cleanse_fix_ldd_check()

Parameters:

Returns:

Description

Check that all libraries the spell binaries need exist


function cleanse_fix_sym_check()

Parameters:

Returns:

Description

Check that all symlink targets exist


function cleanse_fix_md5sum_check()

Parameters:

Returns:

Description

Verify the md5sum of all the files