Gentoo Archives: gentoo-portage-dev

From: Ned Ludd <solar@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] post_sync actions
Date: Sun, 30 Oct 2005 02:05:16
Message-Id: 1130637843.252.72.camel@localhost
In Reply to: Re: [gentoo-portage-dev] [PATCH] post_sync actions by Ned Ludd
1 On Sat, 2005-10-29 at 20:32 -0400, Ned Ludd wrote:
2 > On Sun, 2005-10-30 at 03:15 +0900, Jason Stubbs wrote:
3 > > On Sunday 30 October 2005 01:03, Ned Ludd wrote:
4 > > > The following simple patch adds the ability for to run a userside
5 > > > post_sync script, right now it's only used with rsync but the idea could
6 > > > be adopted rather easy for other methods of transfer that portage may
7 > > > use. The basic idea is to be able to preform a set of maintenance tasks
8 > > > right after sync up with an rsync server. Be that adding a call to svn
9 > > > co, cvs co, ebuild manipulation, updating search caches or other. I've
10 > > > been using this method on and off sense about portage-2.0.51.16 without
11 > > > any problems. Any comments before I file a bug for inclusion?
12 > >
13 > > This really goes hand in hand with the pre/post phase hooks patch. That patch,
14 > > however, implements hooks as bash functions rather than external executables.
15 > > The discrepancy there should probably be worked out before either are
16 > > included. Personally, I'm for the external executable method but I'm sure
17 > > that there will be alternative opinions...
18 >
19 > The pre/post hooks the way it's being worked out seems pretty ideal for
20 > it's purpose. Where this post_sync hook is an action hook vs a phased
21 > hook and we cant really source any files in. I'm thinking both ways are
22 > fitting for what they should do.
23 >
24 > One thing ferringb pointed out that is almost any call portage from the
25 > post_sync might make you spend a little extra time doing a regen.
26 > I don't see an ideal way to work around in the code and I'm thinking it
27 > might even be better in the case of dynamic ebuild manipulation done via
28 > the post_sync. However if you wanted to say have a call a
29 > /usr/bin/glsa-check -nl 2>/dev/null | /bin/sed -ne '/^[^[:space:]]\
30 > +[[:space:]]\[N\]/p'glsa-check -l
31 > then we waste some extra time.
32 >
33 > He had also mentioned perhaps making the post sync a user definable
34 > variable and then spwaning as POST_SYNC="exec1:exec2:exec3". He pointed
35 > out that it would also open a hole in portage where it would look in
36 > profile dirs.
37
38 updated patch that adds error checking and shifts when we exexve to the
39 end patch
40
41 --
42 Ned Ludd <solar@g.o>
43 Gentoo Linux

Attachments

File name MIME type
portage-2.0.53_rc6-post_sync-2.patch text/x-patch

Replies

Subject Author
Re: [gentoo-portage-dev] [PATCH] post_sync actions Jason Stubbs <jstubbs@g.o>