Gentoo Archives: gentoo-portage-dev

From: Elfyn McBratney <beu@×××.org>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] Running commands after a merge (via /etc/portage/package.hooks)
Date: Wed, 22 Sep 2004 11:02:10
Message-Id: 200409221202.15336.beu@gnu.org
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Hello,
5
6 I'm about to start working on a new portage feature that allows you to run
7 commands (basically, bash syntax) before a merge and after a successful
8 merge.
9
10 (At work, we have a lot of virtual hosts with auto-generated vhosts.conf files
11 for apache, with configuration data stored in XML files and/or databases, and
12 having them updated automatically on apache upgrades would ease maintenance
13 burdens. :)
14
15 What I would like to do is add a new file to /etc/portage - package.hooks
16 (open to suggestions on better names ;), which would contain category/package
17 atoms and shell commands, ala:
18
19 [atom] 'before' '(' shell code ')' or
20 [atom] 'after' '(' shell code ')' or
21
22 e.g.
23
24 net-www/apache after apache-update-vhosts
25 net-www/apache after (foo && do-bar || die "do-bar failed")
26
27 Where atom's marked with before would run before the merge, and packages with
28 after (or none specified) would be run after the merge.
29
30 Before I start, does this feature sound useful for other gentoo'ers? :) If
31 I've also left out something really important (happens ;), please ask. =)
32
33 Comments, flames, etc, welcome. :)
34
35 Elfyn
36
37 - --
38 Elfyn McBratney
39 beu on irc.freenode.net/savannah.[non]gnu.org
40
41 PGP Key ID: 0x456548B4
42 PGP Key Fingerprint:
43 29D5 91BB 8748 7CC9 650F 31FE 6888 0C2A 4565 48B4
44 -----BEGIN PGP SIGNATURE-----
45 Version: GnuPG v1.2.4 (GNU/Linux)
46
47 iD8DBQFBUVu0aIgMKkVlSLQRAu0hAJ4rS+5Idji4eFbjHdpllYoNYWOkAwCeKLuk
48 nCWDE+e8kjGXTjLPYQWBxRo=
49 =5Se/
50 -----END PGP SIGNATURE-----
51
52 --
53 gentoo-portage-dev@g.o mailing list

Replies