Gentoo Archives: gentoo-portage-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] post_sync actions
Date: Sun, 30 Oct 2005 04:02:24
Message-Id: 200510301302.43781.jstubbs@gentoo.org
In Reply to: Re: [gentoo-portage-dev] [PATCH] post_sync actions by Ned Ludd
1 On Sunday 30 October 2005 09:32, Ned Ludd wrote:
2 > On Sun, 2005-10-30 at 03:15 +0900, Jason Stubbs wrote:
3 > > This really goes hand in hand with the pre/post phase hooks patch. That
4 > > patch, however, implements hooks as bash functions rather than external
5 > > executables. The discrepancy there should probably be worked out before
6 > > either are included. Personally, I'm for the external executable method
7 > > but I'm sure that there will be alternative opinions...
8 >
9 > The pre/post hooks the way it's being worked out seems pretty ideal for
10 > it's purpose. Where this post_sync hook is an action hook vs a phased
11 > hook and we cant really source any files in. I'm thinking both ways are
12 > fitting for what they should do.
13
14 The purpose of pre/post hooks is to allow user code to be run before/after a
15 phase. What I'm asking is what benefits there are to requiring user hooks to
16 be bash functions versus arbitrary executables.
17
18 > One thing ferringb pointed out that is almost any call portage from the
19 > post_sync might make you spend a little extra time doing a regen.
20 > I don't see an ideal way to work around in the code and I'm thinking it
21 > might even be better in the case of dynamic ebuild manipulation done via
22 > the post_sync. However if you wanted to say have a call a
23 > /usr/bin/glsa-check -nl 2>/dev/null | /bin/sed -ne '/^[^[:space:]]\
24 > +[[:space:]]\[N\]/p'glsa-check -l
25 > then we waste some extra time.
26
27 This is pretty obvious, but has nothing to do with my question...
28
29 > He had also mentioned perhaps making the post sync a user definable
30 > variable and then spwaning as POST_SYNC="exec1:exec2:exec3". He pointed
31 > out that it would also open a hole in portage where it would look in
32 > profile dirs.
33
34 Something like:
35 /etc/portage/hooks/post_sync
36 /etc/portage/hooks/pre_src_unpack
37 /etc/portage/hooks/post_src_compile
38
39 seems more intuitive to me. The POST_SYNC variable would complicate portage
40 code in the attempt to uncomplicate the user code (when more than one script
41 is wanted to be ran). What I'm trying to figure out is why bashrc + post_sync
42 is a better combination.
43
44 --
45 Jason Stubbs
46 --
47 gentoo-portage-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] [PATCH] post_sync actions Brian Harring <ferringb@g.o>