summaryrefslogtreecommitdiffstats
path: root/bin/ebuild-helpers
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-04-24 02:18:34 +0000
committerZac Medico <zmedico@gentoo.org>2009-04-24 02:18:34 +0000
commit0f7b2df6fbe0685c3189f0c62ce92c845dbee7e2 (patch)
tree3437dbdd6d56603f8558937d63f7d10408719eba /bin/ebuild-helpers
parent7f283ebc62463a8911ed3437fe0bc5aa8ed852ef (diff)
downloadportage-0f7b2df6fbe0685c3189f0c62ce92c845dbee7e2.tar.gz
portage-0f7b2df6fbe0685c3189f0c62ce92c845dbee7e2.tar.bz2
portage-0f7b2df6fbe0685c3189f0c62ce92c845dbee7e2.zip
Add dohard and doset helper which die for EAPI 3. TODO: Make 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. svn path=/main/trunk/; revision=13389
Diffstat (limited to 'bin/ebuild-helpers')
l---------bin/ebuild-helpers/3/dohard1
l---------bin/ebuild-helpers/3/dosed1
-rwxr-xr-xbin/ebuild-helpers/die12
3 files changed, 14 insertions, 0 deletions
diff --git a/bin/ebuild-helpers/3/dohard b/bin/ebuild-helpers/3/dohard
new file mode 120000
index 000000000..1a6b57a39
--- /dev/null
+++ b/bin/ebuild-helpers/3/dohard
@@ -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
index 000000000..1a6b57a39
--- /dev/null
+++ b/bin/ebuild-helpers/3/dosed
@@ -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
index 000000000..e871bd9fe
--- /dev/null
+++ b/bin/ebuild-helpers/die
@@ -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