Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13541 - in main/branches/2.1.6/bin: . ebuild-helpers ebuild-helpers/3
Date: Thu, 30 Apr 2009 07:24:51
Message-Id: E1LzQdU-0001hC-SY@stork.gentoo.org
1 Author: zmedico
2 Date: 2009-04-30 07:24:48 +0000 (Thu, 30 Apr 2009)
3 New Revision: 13541
4
5 Added:
6 main/branches/2.1.6/bin/banned-helper
7 main/branches/2.1.6/bin/ebuild-helpers/3/dohard
8 main/branches/2.1.6/bin/ebuild-helpers/3/dosed
9 main/branches/2.1.6/bin/ebuild-helpers/die
10 Modified:
11 main/branches/2.1.6/bin/ebuild.sh
12 Log:
13 Add dohard and doset helper which die for EAPI 3. TODO: Make the die
14 helper use pipe or socket IPC instead of a signal, to avoid a potential
15 race condition in signal delivery. Thanks to to Tiziano M?\195?\188ller <dev-zero@g.o>
16 for the initial patch. (trunk r13389)
17
18 Copied: main/branches/2.1.6/bin/banned-helper (from rev 13389, main/trunk/bin/banned-helper)
19 ===================================================================
20 --- main/branches/2.1.6/bin/banned-helper (rev 0)
21 +++ main/branches/2.1.6/bin/banned-helper 2009-04-30 07:24:48 UTC (rev 13541)
22 @@ -0,0 +1,7 @@
23 +#!/bin/bash
24 +# Copyright 2009 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +# $Id$
27 +
28 +die "'${0##*/}' has been banned for EAPI '$EAPI'"
29 +exit 1
30
31 Copied: main/branches/2.1.6/bin/ebuild-helpers/3/dohard (from rev 13389, main/trunk/bin/ebuild-helpers/3/dohard)
32 ===================================================================
33 --- main/branches/2.1.6/bin/ebuild-helpers/3/dohard (rev 0)
34 +++ main/branches/2.1.6/bin/ebuild-helpers/3/dohard 2009-04-30 07:24:48 UTC (rev 13541)
35 @@ -0,0 +1 @@
36 +link ../../banned-helper
37 \ No newline at end of file
38
39 Copied: main/branches/2.1.6/bin/ebuild-helpers/3/dosed (from rev 13389, main/trunk/bin/ebuild-helpers/3/dosed)
40 ===================================================================
41 --- main/branches/2.1.6/bin/ebuild-helpers/3/dosed (rev 0)
42 +++ main/branches/2.1.6/bin/ebuild-helpers/3/dosed 2009-04-30 07:24:48 UTC (rev 13541)
43 @@ -0,0 +1 @@
44 +link ../../banned-helper
45 \ No newline at end of file
46
47 Copied: main/branches/2.1.6/bin/ebuild-helpers/die (from rev 13389, main/trunk/bin/ebuild-helpers/die)
48 ===================================================================
49 --- main/branches/2.1.6/bin/ebuild-helpers/die (rev 0)
50 +++ main/branches/2.1.6/bin/ebuild-helpers/die 2009-04-30 07:24:48 UTC (rev 13541)
51 @@ -0,0 +1,12 @@
52 +#!/bin/bash
53 +# Copyright 2009 Gentoo Foundation
54 +# Distributed under the terms of the GNU General Public License v2
55 +# $Id$
56 +
57 +# TODO: Eliminate race condition in signal delivery by using pipe or socket
58 +# IPC to guarantee that the ebuild process and all of its children (including
59 +# this helper) are killed immediately, ensuring that "false success" is
60 +# impossible.
61 +source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
62 +die "$@"
63 +exit 1
64
65 Modified: main/branches/2.1.6/bin/ebuild.sh
66 ===================================================================
67 --- main/branches/2.1.6/bin/ebuild.sh 2009-04-30 07:24:19 UTC (rev 13540)
68 +++ main/branches/2.1.6/bin/ebuild.sh 2009-04-30 07:24:48 UTC (rev 13541)
69 @@ -56,8 +56,8 @@
70 return $retval
71 }
72
73 -# subshell die support
74 -EBUILD_MASTER_PID=$$
75 +# Subshell/helper die support (must export for the die helper).
76 +export EBUILD_MASTER_PID=$$
77 trap 'exit 1' SIGTERM
78
79 EBUILD_SH_ARGS="$*"