Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 141215

Summary: Portage phase hooks patch
Product: Portage Development Reporter: Mike Kelly (RETIRED) <pioto>
Component: Enhancement/Feature RequestsAssignee: Portage team <dev-portage>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: ed
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://soc.gentoo.org/viewcvs.py/*checkout*/glep0027/patches/portage-hooks.patch
Whiteboard:
Package list:
Runtime testing required: ---

Description Mike Kelly (RETIRED) gentoo-dev 2006-07-20 16:09:02 UTC
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.
Comment 1 Ed Catmur 2006-07-20 20:14:46 UTC
(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.
Comment 2 Mike Kelly (RETIRED) gentoo-dev 2006-08-07 06:55:38 UTC
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.