Gentoo Archives: gentoo-portage-dev

From: Alec Warner <antarus@g.o>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] Default Phase Hooks
Date: Fri, 09 Feb 2007 06:51:46
1 In order to facilitate better ease of use with phase hooks, I propose a
2 paludis-style default phase hook. Basically provides a default
3 hook that looks in PORTAGE_HOOKS_DIR/{pre,post}_${EBUILD_PHASE}/ for shell
4 scripts and sources them.
6 The patch to only generates hooks 1 phase at a time. People
7 with existing hooks in bashrc will not be affected (the bashrc hooks will
8 over-ride these default hooks).
10 The motivation here is to have users create functionality in these hooks
11 and enable them to easily share hooks. 'hey drop this hook in location X'
12 is a lot easier than 'add this hook to bashrc...oh and make sure you don't
13 already have a post_pkg_prerm hook in there...oh and make sure if you do
14 have an existing hook you make it so that both run...' and so forth.
16 For people with no hooks the speed penalty is nil; for those with many
17 hooks, there is probably some small overhead per phase as the script
18 enumerates and sources the hooks.
20 Comments and Questions are welcome.
22 -Alec Warner


File name MIME type
default-phase-hooks.patch text/plain


Subject Author
Re: [gentoo-portage-dev] Default Phase Hooks Ed Catmur <ed@×××××××××.uk>