[gentoo-portage-dev] please explain use of hooks

2008-03-01 Thread Jonas Bernoulli
Hello

I was aware that the alternative package managers provide hooks for
some time now, but only found out recently that portage also has this
feature. Unfortunately I was not able to find any documentation about
it. I found some information related to hooks in portage on this list
and elsewhere but all of those sources assumed that the reader already
knows the basics.

So what I am looking for is a tutorial along the lines howto write
you first portage hook function. Of course a more in-depth
description would also be welcome. If something like this already
exists I apologize for not searching enough, and kindly ask you to
point you to the location.

The earlies post about hooks on this list seam to be from 2005, so I
was a bit surprised I could not find any documentation about them. In
my opinion this should be documented in the handbook. I can only
assume that either no one found the time to write it or that hooks are
intentionally not documented to prevent users from messing things up
and then filling untraceable bug reports. So if later were the case I
would still be very thankful if you could answer me in private, even
though I think this should be documented in public.

--Jonas
-- 
gentoo-portage-dev@lists.gentoo.org mailing list



Re: [gentoo-portage-dev] please explain use of hooks

2008-03-01 Thread Zac Medico
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonas Bernoulli wrote:
 So what I am looking for is a tutorial along the lines howto write
 you first portage hook function. Of course a more in-depth
 description would also be welcome. If something like this already
 exists I apologize for not searching enough, and kindly ask you to
 point you to the location.

When portage is installed with USE=doc enabled, you'll find that
there is a small Ebuild Phase Hooks section in the first chapter
of the html documentation. Writing a phase hook is very much like
writing a normal ebuild phase function. You just need to add a pre_
or post_ prefix to then name.

Zac
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.7 (GNU/Linux)

iD8DBQFHyaK0/ejvha5XGaMRAjykAKCqcknbMtkLcqWSqB2t9wPN3PES7gCfQbPa
6MXfRyMUVQJBdREffaCwEBs=
=6ymu
-END PGP SIGNATURE-
-- 
gentoo-portage-dev@lists.gentoo.org mailing list