Merged from trunk -r13387:13391
authorFabian Groffen <grobian@gentoo.org>
Sat, 25 Apr 2009 08:40:48 +0000 (08:40 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 25 Apr 2009 08:40:48 +0000 (08:40 -0000)
   | 13388   | Set executable.                                              |
   | zmedico |                                                              |

   | 13389   | Add dohard and doset helper which die for EAPI 3. TODO: Make |
   | zmedico | the die helper use pipe or socket IPC instead of a signal,   |
   |         | to avoid a potential race condition in signal delivery.      |
   |         | Thanks to to Tiziano Müller <dev-zero@g.o> for the initial  |
   |         | patch.                                                       |

   | 13390   | Add dummy dosed and dohard functions for EAPI 3, so that a   |
   | zmedico | trace can be displayed (not possible with the helper         |
   |         | binaries).                                                   |

   | 13391   | Revert r13390 (dosed and dohard functions) since a stack     |
   | zmedico | trace isn't really important this particular QA feature.     |
   |         | Thanks to Tiziano Müller <dev-zero@g.o> for the suggestion. |

svn path=/main/branches/prefix/; revision=13395

bin/banned-helper [new file with mode: 0755]
bin/ebuild-helpers/3/dodoc [changed mode: 0644->0755]
bin/ebuild-helpers/3/dohard [new symlink]
bin/ebuild-helpers/3/dosed [new symlink]
bin/ebuild-helpers/die [new file with mode: 0755]
bin/ebuild.sh

diff --git a/bin/banned-helper b/bin/banned-helper
new file mode 100755 (executable)
index 0000000..aa962a1
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/bash
+# Copyright 2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+die "'${0##*/}' has been banned for EAPI '$EAPI'"
+exit 1
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/bin/ebuild-helpers/3/dohard b/bin/ebuild-helpers/3/dohard
new file mode 120000 (symlink)
index 0000000..1a6b57a
--- /dev/null
@@ -0,0 +1 @@
+../../banned-helper
\ No newline at end of file
diff --git a/bin/ebuild-helpers/3/dosed b/bin/ebuild-helpers/3/dosed
new file mode 120000 (symlink)
index 0000000..1a6b57a
--- /dev/null
@@ -0,0 +1 @@
+../../banned-helper
\ No newline at end of file
diff --git a/bin/ebuild-helpers/die b/bin/ebuild-helpers/die
new file mode 100755 (executable)
index 0000000..e871bd9
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+# Copyright 2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# TODO: Eliminate race condition in signal delivery by using pipe or socket
+# IPC to guarantee that the ebuild process and all of its children (including
+# this helper) are killed immediately, ensuring that "false success" is
+# impossible.
+source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh
+die "$@"
+exit 1
index 275e2757810ed7b1119124cfa1c12dcc570712b0..cee668e06af0b099d5db164eb7e0fe0970d76944 100755 (executable)
@@ -56,8 +56,8 @@ qa_call() {
        return $retval
 }
 
-# subshell die support
-EBUILD_MASTER_PID=$$
+# Subshell/helper die support (must export for the die helper).
+export EBUILD_MASTER_PID=$$
 trap 'exit 1' SIGTERM
 
 EBUILD_SH_ARGS="$*"