Gentoo Archives: gentoo-portage-dev

From: Marius Mauch <genone@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] Portage phase hooks patch
Date: Sun, 23 Jul 2006 04:08:10
Message-Id: 20060723060931.7f73dee6@sven.genone.homeip.net
In Reply to: Re: [gentoo-portage-dev] Portage phase hooks patch by Zac Medico
1 On Sat, 22 Jul 2006 16:52:38 -0700
2 Zac Medico <zmedico@g.o> wrote:
3
4 > -----BEGIN PGP SIGNED MESSAGE-----
5 > Hash: SHA1
6 >
7 > Mike Kelly wrote:
8 >
9 > > In my case, I feel this functionality would be very useful as it
10 > > allows for me to integrate my GLEP 27 implementation into portage
11 > > without portage needing to worry about my implementation specifics,
12 > > which may well change in later versions. I am sure there are other
13 > > practical ways in which these hooks could be used.
14 > >
15 > > Patch at:
16 > > http://soc.gentoo.org/viewcvs.py/*checkout*/glep0027/patches/portage-hooks.patch
17 > >
18 > > See bug# 141215.
19 > >
20 >
21 > I like the idea. My main concern is that, like /etc/portage/bashrc,
22 > this creates lots of potential for foreign code to interfere with the
23 > internal workings of the ebuild environment. At a minimum, I think
24 > there should be something in the `emerge --info` output that
25 > indicates whether or not any phase hooks exist.
26 >
27 > Traditionally, configurable files that affect portage behavior go
28 > mostly in /etc/portage. I see that your intention is to
29 > make /var/libexec/portage/hooks/ a location for third-party packages
30 > to install hooks, so it makes sense to keep those separate from hooks
31 > that the user might install. I know that portage-utils currently
32 > installs a post-sync hook in /etc/portage/postsync.d/q-reinitialize,
33 > so there is some inconsistency there. We need to develop a
34 > consistent policy for appropriate locations of files like these.
35
36 I still think that those hooks should go into the tree rather than
37 being installed by packages. That's mainly so they get increased
38 visibility and gives us (us being Gentoo, not just Portage) more
39 access and control over them, like we have with eclasses.
40
41 This also moves responsibility from hook authors to pkgmanager authors
42 (the package mamanger has to support the hook format in the tree, not
43 the hook has to support (all of) the specific package manager hook
44 formats). I know Mike has taken care of Paludis support already, but
45 look at a larger scale:
46 a) n hook authors supporting m package manager interfaces: O(n*m)
47 b) n hook authors and m package managers supoprting one repository
48 interface: O(n+m)
49 Also with a) you have to play what I call the "catch up game", e.g. a
50 new package manager gets out and all hooks have to account for a new
51 interface (even if it's just a new path).
52 Of course a) has the "drawback" that it requires a solid spec of the
53 interface, but that's something we want anyway.
54
55 However, *if* they are going to be installed by packages they should go
56 either into /etc/portage/foobar or /usr/lib/portage/foobar (like any
57 3rd party elog or cache modules), foobar being something we'd have to
58 decide on.
59 The suggested /var/libexec/portage has several issues:
60 - /var/libexec is AFAIK not defined by FHS
61 - executable data doesn't belong in /var unless it's application data
62 which isn't the case here
63 - libexec generally sucks (even in /usr), especially as we already
64 use /usr/lib for what generally goes there (support scripts)
65
66 Independent on the location I'd like to see the ability to blacklist
67 individual hooks for testing, troubleshooting, debugging and probably a
68 few other reasons. And no, this should not be done with $FEATURES ;)
69
70 Marius
71
72 --
73 Public Key at http://www.genone.de/info/gpg-key.pub
74
75 In the beginning, there was nothing. And God said, 'Let there be
76 Light.' And there was still nothing, but you could see a bit better.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-portage-dev] Portage phase hooks patch Brian Harring <ferringb@×××××.com>