Cleanse is a script whose purpose is to clean up the SMGL portion of a 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 occasionally, but it does mean repeat questions if spells are 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
- Finds and removes dependency entries for spells that have been removed
--prune [doit]
- It ensures that the dependency tree is valid with no missing dependencies
- Finds dependencies for spells that are installed, but have a dependency on an uninstalled spell
- If 'doit' is specified, then it will cast and dispel after done asking
questions. If doit is not specified, then 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
--tablet_spell spell-name
- Fixes tablet for just the specified spell.
Cleanse does quite a bit of checking, but some bugs arise. Known bugs:
- If there exists a spell that used to depend on another spell, but no longer depends on it, then the depends file will still have the incorrect information
until cast -r is run on the original spell.
- If there exists several spells that depend on a service and the provider of the service is switched, then cleanse will complain about every spell that depends on the original service.
- Example: Several spells depend on X11-LIBS. The spell provider changes from xorg-lib to another-xorg-lib. cleanse will complain about each spell that was casted when xorg-lib provided XORG-LIBS unless the spells were recasted.
This can be fixed by a simple sed script. It would be better automated.
