Proposal: a generic dpkg event hook broker
Packages often benefit from having other packages installed but don't
necessary require them, hence 'suggests' and 'recommends'.
Such packages, however, often require additional configuration to make them
work with those optional packages. It's not usually very complicated and
could in many cases be easily made automatic if there was a way to run the
setup scripts when the optional packages come available.
I propose making a "dpkg event broker", a database of scripts that would like
to run when the packages they are interested in are getting a
This kind of "install hook" system is already implemented in some individual
packages like emacs (registering/deregistering plugins, I think) and
openoffice (also registering plugins).
As an additional example,
it would be nice to have 'libgphoto2' setup digital camera permission scripts
when 'hotplug' is installed after asking the user which flavour of the script
she wants (grant access to user or group and to which one) and removing them
when 'hotplug' is being uninstalled. The manual procedure for doing this is
currently explained in README.Debian of 'libgphoto2' but it would be nice if
it was automatic 1) to make it easier for the admin and 2) because most users
(myself included) will read the file only as a last resort.. ;)
Comments, objections and/or suggestions for implementation details?