summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-03 20:13:17 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-03 20:13:17 +0000
commit38a4cf4b0821f0d880d8aeb6adf2c8c55af63e20 (patch)
tree6d2f34bc8cf07f518e50b45f77127634c501e803
parentOnly treat non-negative integers as valid in insert_optional_args(). (diff)
downloadportage-multirepo-38a4cf4b0821f0d880d8aeb6adf2c8c55af63e20.tar.gz
portage-multirepo-38a4cf4b0821f0d880d8aeb6adf2c8c55af63e20.tar.bz2
portage-multirepo-38a4cf4b0821f0d880d8aeb6adf2c8c55af63e20.zip
Remove the code from bug #278895 since we're going to need a daemon process
in the ebuild's login session in order to pass signals from the controlling terminal to the detached session. A simple fifo-based approach in ebuild.sh does not seem to work since bash's read builtin occasionally loses the fifo data when it's 'Interrupted system call'. Maybe a python script will work better for the session leader/daemon. NOTE: The daemon will also be useful for implementing a fifo-based die helper (to replace the current signal- based approach). svn path=/main/trunk/; revision=13879
-rwxr-xr-xbin/ebuild.sh13
-rwxr-xr-xbin/isolated-functions.sh3
-rwxr-xr-xbin/setsid10
-rw-r--r--pym/portage/__init__.py1
4 files changed, 1 insertions, 26 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 6843331e..3ee9be0a 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -25,19 +25,6 @@ PREROOTPATH=${PREROOTPATH%%:}
PATH=$PORTAGE_BIN_PATH/ebuild-helpers:$PREROOTPATH${PREROOTPATH:+:}/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin${ROOTPATH:+:}$ROOTPATH
export PATH
-if [[ -z $PORTAGE_SETSID && -n $1 && $1 != depend ]] ; then
- # If available, use setsid to create a new login session so that we can use
- # SIGHUP to ensure that no orphaned subprocesses are left running.
- if type -P setsid >/dev/null ; then
- export PORTAGE_SETSID=1
- exec setsid "$PORTAGE_BIN_PATH/ebuild.sh" "$@"
- elif [[ -x $PORTAGE_BIN_PATH/setsid ]] ; then
- export PORTAGE_SETSID=1
- exec "$PORTAGE_BIN_PATH/setsid" "$PORTAGE_BIN_PATH/ebuild.sh" "$@"
- fi
-fi
-[[ $PORTAGE_SETSID = 1 ]] && trap 'trap : SIGHUP ; kill -s SIGHUP 0 ;' EXIT
-
# These two functions wrap sourcing and calling respectively. At present they
# perform a qa check to make sure eclasses and ebuilds and profiles don't mess
# with shell opts (shopts). Ebuilds/eclasses changing shopts should reset them
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index 83270506..a05cffed 100755
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -536,8 +536,7 @@ save_ebuild_env() {
PORTAGE_DEPCACHEDIR PORTAGE_GID PORTAGE_INST_GID \
PORTAGE_INST_UID PORTAGE_LOG_FILE PORTAGE_MASTER_PID \
PORTAGE_QUIET \
- PORTAGE_REPO_NAME PORTAGE_RESTRICT \
- PORTAGE_SETSID PORTAGE_UPDATE_ENV \
+ PORTAGE_REPO_NAME PORTAGE_RESTRICT PORTAGE_UPDATE_ENV \
PORTAGE_VERBOSE PORTAGE_WORKDIR_MODE PORTDIR \
PORTDIR_OVERLAY ${!PORTAGE_SANDBOX_*} PREROOTPATH \
PROFILE_PATHS PWORKDIR QA_INTERCEPTORS \
diff --git a/bin/setsid b/bin/setsid
deleted file mode 100755
index 1be1e55c..00000000
--- a/bin/setsid
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/python -O
-# Copyright 2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-import os
-import sys
-
-os.setsid()
-os.execl(sys.argv[1], *sys.argv[1:])
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 4548ec3c..28f42ba7 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -1048,7 +1048,6 @@ class config(object):
"EBUILD_PHASE", "EMERGE_FROM", "HOMEPAGE", "INHERITED", "IUSE",
"KEYWORDS", "LICENSE", "PDEPEND", "PF", "PKGUSE",
"PORTAGE_CONFIGROOT", "PORTAGE_IUSE", "PORTAGE_REPO_NAME",
- "PORTAGE_SETSID",
"PORTAGE_USE", "PROPERTIES", "PROVIDE", "RDEPEND", "RESTRICT",
"ROOT", "SLOT", "SRC_URI"
]