This is that patch I had mentioned earlier on #gentoo-portage. It works by sourcing every script found in /var/libexec/portage/hooks/{pre,post}_${EBUILD_PHASE} at the appropriate time. In my case, I feel this functionality would be very useful as it allows for me to integrate my GLEP 27 implementation into portage without portage needing to worry about my implementation specifics, which may well change in later versions. I am sure there are other practical ways in which these hooks could be used.
(In reply to comment #0) > I am sure there are other practical ways in which these hooks could be used. Amen to that. Some possibilities: * gnome-screensaver: post install hook for migrating xscreensaver configs * info: move chk_updated_info_files out of emerge and into a post postinst/postrm hook * devhelp: automatically index installed documentation ... etc.
I don't think that my implementation of this is really that great, and I'm not convinced that this is really the way to go for what I'm shooting for. Instead I'm just going to draft an API for my scripts and pass that on to portage devs for later inclusion in the portage code.