Gentoo Archives: gentoo-portage-dev

From: Simon Stelling <blubb@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] default postsync
Date: Thu, 04 May 2006 20:37:29
Message-Id: 445A65B9.10903@gentoo.org
In Reply to: [gentoo-portage-dev] default postsync by Ned Ludd
1 Ned Ludd wrote:
2 > #!/bin/sh
3 > # Copyright 2006 Gentoo Foundation
4 > # Distributed under the terms of the GNU General Public License v2
5 > # $Header: $
6 >
7 > if [ -d /etc/portage/postsync.d/ ]; then
8 > for f in /etc/portage/postsync.d/* ; do
9 > if [ -x ${f} ] ; then
10 > ${f}
11 > fi
12 > done
13 > else
14 > :
15 > fi
16 > ##############################
17 >
18 > How do you think we should handle it?
19
20 I'd prefer this way:
21
22 ----
23 #!/bin/sh
24 # Copyright 2006 Gentoo Foundation
25 # Distributed under the terms of the GNU General Public License v2
26 # $Header: $
27
28 if [ -f /etc/portage/bashrc ]; then
29 source /etc/portage/bashrc
30 [ "$(type -t post_sync)" == "function" ] && post_sync
31 fi
32 ----
33
34 i.e. use bashrc for this. We handle the existing hooks through bashrc,
35 and postsync hooks aren't anything different, so they should be handled
36 through the same logic. I think it's just more intuitive than a
37 postsync.d/ subdirectory.
38
39 --
40 Kind Regards,
41
42 Simon Stelling
43 Gentoo/AMD64 Developer
44 --
45 gentoo-portage-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-portage-dev] default postsync Ned Ludd <solar@g.o>