Description:
This is an extension to eselect to added support for paludis hooks in eselect, for easy enabling and disabling.
Dependencies:
app-admin/eselect
Code:
paludis -i app-admin/eselect-paludis-hooks
Enable the eselect extended use flag in the /etc/paludis/use.conf file, by adding eselect to the line.
Code:
* PALUDIS_HOOKS: eselect .......
Then run:
Code:
paludis -i paludis-hooks --dl-reinstall if-use-changed
To get a list of usage options run
Code:
eselect paludis-hook
Code: Usage information
Usage: eselect paludis-hook < action > < options >
Standard actions:
help Display help text
usage Display usage information
version Display version information
Extra actions:
check < target > Check a hook's symlinks
target A hookname (from 'list' action) or 'all', to
check all hooks
disable < target > Disable a hook - remove symlinks
target A hookname (from 'list' action) or 'all', to
disable all hooks
enable < target > Enable a hook
target A hookname (from 'list' action) or 'all', to
enable all hooks
list List hooks managable by eselect
To get a list of hooks that is installed, you can run the command below, which also shows the state of the hooks.
Code: List installed hooks and state
eselect paludis-hook list
To enable/disable a hook you can run a command like the one below.
Code: Enable the update-eix hook
eselect paludis-hook enable update-eix
Code: Disable the update-eix hook
eselect paludis-hook disable update-eix
You can use the check command to see at witch points the hook script is being run, and if all of the symlinks are there, like this
Code: Example 1 where we check update-eix
# eselect paludis-hook check update-eix
checking update-eix ...
update-eix.bash should be linked to:
sync_all_pre/ ... OK
sync_all_post/ ... OK
Code: Example 2 where we check update-eix
# eselect paludis-hook check update-eix
checking update-eix ...
update-eix.bash is not enabled.
Checking stale links:
sync_all_pre/ ... no symlink ... OK
sync_all_post/ ... no symlink ... OK
The hooks managed via eselect paludis-hook are placed in the /usr/share/paludis/hooks/common/ folder.
eselect paludis-hook has a definition of which hook scripts need to be linked to which hook folder. These definition files are located in /usr/share/paludis/hooks/eselect/ which is of the following format
Code: Definition file format
path_to_script/hook-script hook_dir_1 hook_dir_2 ...
Code: Definition example for update-eix
# eselect definition file for paludis-hooks-update-eix-2.1.1 common/update-eix.bash sync_all_pre sync_all_post
If you are interested in the sources, or helping develop, then the sources can be fetched from our anonymous git repo at:
Code:
git clone git://git.paludis-extras.org/app-admin/eselect-paludis-hooks.git
scripts:
paludis-hook.eslect script (click to see) ( download )

