Gentoo Archives: gentoo-portage-dev

From: Jonas Bernoulli <jonas@×××××××××.cc>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] please explain use of hooks
Date: Sun, 02 Mar 2008 10:18:41
Message-Id: 201bac3a0803020218q72318603r3c567250d876a0a5@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] please explain use of hooks by Alec Warner
1 On Sat, Mar 1, 2008 at 7:38 PM, Zac Medico <zmedico@g.o> wrote:
2
3 > When portage is installed with USE=doc enabled, you'll find that
4 > there is a small "Ebuild Phase Hooks" section in the first chapter
5 > of the html documentation.
6
7 thx. I never bothered looking there as I have always assumed that
8 would just install the handbook.
9
10 I have seen rather complex uses of hooks, that's why I thought it
11 would be harder to get started.
12
13
14 On Sun, Mar 2, 2008 at 2:27 AM, Alec Warner <antarus@g.o> wrote:
15
16 > Do not attribute to malice what can easily be attributed to laziness ;)
17
18 yes sorry about that. Though I was not really all that lazy just made
19 a really bad assumption.
20
21 And if not the handbook this should really go into the portage manpage.
22
23 bashrc
24
25 If needed, this file can be used to set up a
26 special environment for ebuilds, different from
27 the standard root environment. The syntax is the
28 same as for any other bash script.
29 + One thing you can do here is define phase hooks.
30 + A phase hook function name begins with a pre_ or post_ prefix to
31 indicate that it will be called before or after one of the ebuild
32 phases. The prefix is followed by the name of the ebuild function that
33 the hook will be associated with. + For example, a hook named
34 pre_src_compile will be called before src_compile, and a hook named
35 post_src_compile will be called after src_compile.
36
37 postsync.d should also be documented there.
38
39 All in all now that I have looked at the documentation installed with
40 portage I think it is obsolete. Not in the sense that it is outdated
41 but everything in it is documented elsewhere already or should be
42 moved there.
43
44 II. Package Formats -> 2. Ebuild -> Ebuild Phases is already in the
45 developer handbook and
46
47 III. Quality Assurance -> 3. QA Notices should be moved to the
48 developer handbook
49
50
51 If some developers an the list agree with me and welcome me to do so
52 then I could file a bug(s) for those changes.
53
54 --Jonas
55 --
56 gentoo-portage-dev@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] please explain use of hooks Marius Mauch <genone@g.o>