From: Michael Haubenwallner <haubi@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] stacking profile.bashrc?
Date: Thu, 16 Jul 2009 09:17:00 +0200 [thread overview]
Message-ID: <1247728620.1554.56.camel@salomon-22> (raw)
In-Reply-To: <4A5E2255.2070401@gentoo.org>
On Wed, 2009-07-15 at 11:39 -0700, Zac Medico wrote:
> Michael Haubenwallner wrote:
> > We do have post_src_install() hook in profiles/prefix/profile.bashrc ...
> > In profiles/prefix/aix/profiles.bashrc, there is another
> > post_src_install() hook ...
> > The problem now is that the latter post_src_install() overrides the
> > former, ...
> The pre/post phase hooks are not designed for this, they are only
> intended for users to put in /etc/portage/bashrc. For what you are
> trying to do, it seems like a registration interface would be more
> appropriate (something like register_die_hook).
Should this registration api be provided by portage, or by
base/profile.bashrc?
Hmm, will have to be portage, because /etc/portage/bashrc would override
base/profile.bashrc too. base/profile.bashrc just might jump in when not
provided by installed portage yet.
> Maybe the usage
> could go something like this:
>
> register_phase_hook install post my_post_src_install
For readability, I'd more like to have 'post' in front of 'install'.
Or eventually something like:
register_phase_hook \
--before-src_install my_pre_src_install_1 my_pre_src_install_2 \
--after-src_install my_post_src_install_1 my_post_src_install_2 \
--before-<phase-function-name> <multiple hooks>
Or with phase-names instead of phase-function-names:
register_phase_hook \
--before-{setup,nofetch,unpack,prepare,configure,compile,...} <hooks> \
--after-{...,test,install,preinst,postinst,prerm,postrm} <hooks>
Suggesting "before&after" here as I'm always confused with
pre_pkg_preinst, post_pkg_preinst, pre_pkg_postinst, post_pkg_postinst,
pre_pkg_prerm, post_pkg_prerm, pre_pkg_postrm, post_pkg_prerm.
Anyway: besides implementation, what else does it need to get this done?
Thank you!
/haubi/
--
Michael Haubenwallner
Gentoo on a different level
next prev parent reply other threads:[~2009-07-16 7:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-13 13:47 [gentoo-dev] stacking profile.bashrc? Michael Haubenwallner
2009-07-15 18:39 ` Zac Medico
2009-07-16 7:17 ` Michael Haubenwallner [this message]
2009-07-16 18:54 ` Zac Medico
2009-07-20 4:52 ` [gentoo-dev] " Steven J Long
2009-07-20 17:04 ` Ciaran McCreesh
2009-07-20 19:30 ` Zac Medico
2009-07-21 5:00 ` [gentoo-dev] " Steven J Long
2009-07-21 6:26 ` Zac Medico
2009-07-22 11:36 ` [gentoo-dev] " Steven J Long
2009-07-22 21:25 ` Zac Medico
2009-08-18 0:51 ` [gentoo-dev] " Steven J Long
-- strict thread matches above, loose matches on Subject: below --
2009-07-15 7:43 [gentoo-dev] " Michael Haubenwallner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1247728620.1554.56.camel@salomon-22 \
--to=haubi@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox