Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o, haubi@g.o
From: Zac Medico <zmedico@g.o>
Subject: Re: stacking profile.bashrc?
Date: Thu, 16 Jul 2009 11:54:14 -0700
Michael Haubenwallner wrote:
> 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?

The specification is really the most important part, and you have to
give the -dev community an opportunity to participate in refining
the spec (via RFC email, GLEP, or whatnot).

It seems like this idea will probably serve for bug 179800, which is
about allowing eclasses to register phase hooks:

  http://bugs.gentoo.org/show_bug.cgi?id=179800

> 
> Thank you!
> 
> /haubi/


-- 
Thanks,
Zac


Replies:
Re: stacking profile.bashrc?
-- Steven J Long
References:
Re: stacking profile.bashrc?
-- Zac Medico
Re: stacking profile.bashrc?
-- Michael Haubenwallner
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: stacking profile.bashrc?
Next by thread:
Re: stacking profile.bashrc?
Previous by date:
Lastrite: media-libs/ladcca (replaced by media-sound/lash by upstream)
Next by date:
Re: [GSoC status] Web-based image builder


Updated Mar 22, 2010

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.