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.
Copyright 2004 by Paul Mahon for Source Mage
Relased under the GNU GPL version 2
Usage statement
Gives the usage of this script
--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
--tablet_spell Clean up the tablet for one spell
Interpret the arguments to this script
Answers to questions
Misc output and questions
Find stale dependency entries, with full it'll look at off entries too
responses to queries
questions about what to do about problems
Find missing spells, do the actions of "doit" is specified
Misc status output
Find packages entries that are corrupted, or non-existant
[nofix] [spell [spell [...]]]
May return non zero if there was a problem.
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
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
Spell [check nr,total nr]
Run the checks on a spell.
The skipped directories should be made configurable somewhere
Check that all files installed still exist.
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
Check that all libraries the spell binaries need exist
Check that all symlink targets exist
Verify the md5sum of all the files