Cleanse is a script whos purpose is to clean up the smgl portion of your system. It takes the following arguments:
--delint [full]
Finds and removes dependency entries for spells that have been removed (with full)
* This should be run occasionaly, but it does mean you'll be asked the same questions over again if you recast at a later date
Removes duplicate lines, including lines that are for the the same spell and dependency, but different on/off or options (prompted)
Also removed corrupted lines in the depends file
* [full] will delint dependencies that are off
--prune [doit]
It ensures that your dependency tree is valid, no missing dependencies
Finds dependencies for spells that are installed, but have a dependency on an uninstalled spell
If 'doit' is specified it will cast and dispel after done asking questions. If doit is not specified, it will simply print out the cast and dispel commands.
--packages
Finds corrupted lines in the packages file
Finds spells that are installed, but for which the spell is no longer in a grimoire
--fix [spell ...]
aka cast --fix [spell ...]
Checks installed spells for errors
* Modified files
* Missing files/symlinks
* Missing needed library (happens when another spell changes lib versions on occasion)
Recasts a spell if there is a problem detected with it
--nofix [spell ...]
aka cast --nofix [spell ...]
Same as cleanse --fix [spell ...] except it won't recast
--nofix_quick [spell ...]
Same as --nofix, but does not check dependent spells
--logs
Cleans out old logs in the same way a system-update does
--sweep
aka gaze --prune
Cleans out old spool and cache files
As you can see it does quite a bit of checking. It is still fairly dumb though. It is missing several cases:
Spell A used to depend on B. You cast A and B. Later, A no longer depends on B so it is removed from the spell's DEPENDS. Your depends file will still have the A depends on B line until you cast -r A.
You have several spells that depend on service A (example X11-LIBS). You decide you want to use another provider, so you switch from provider B (example xfree86) to provider C (xorg). Cleanse will complain about every spell which has not been recast which was last cast with the first provider. This can be fixed manualy with a simple sed, but it would be nice to have it done in cleanse or cast automaticly
