1 |
Author: zmedico |
2 |
Date: 2009-08-03 20:13:17 +0000 (Mon, 03 Aug 2009) |
3 |
New Revision: 13879 |
4 |
|
5 |
Removed: |
6 |
main/trunk/bin/setsid |
7 |
Modified: |
8 |
main/trunk/bin/ebuild.sh |
9 |
main/trunk/bin/isolated-functions.sh |
10 |
main/trunk/pym/portage/__init__.py |
11 |
Log: |
12 |
Remove the code from bug #278895 since we're going to need a daemon process |
13 |
in the ebuild's login session in order to pass signals from the controlling |
14 |
terminal to the detached session. A simple fifo-based approach in ebuild.sh |
15 |
does not seem to work since bash's read builtin occasionally loses the fifo |
16 |
data when it's 'Interrupted system call'. Maybe a python script will work |
17 |
better for the session leader/daemon. NOTE: The daemon will also be useful |
18 |
for implementing a fifo-based die helper (to replace the current signal- |
19 |
based approach). |
20 |
|
21 |
|
22 |
Modified: main/trunk/bin/ebuild.sh |
23 |
=================================================================== |
24 |
--- main/trunk/bin/ebuild.sh 2009-08-03 17:48:09 UTC (rev 13878) |
25 |
+++ main/trunk/bin/ebuild.sh 2009-08-03 20:13:17 UTC (rev 13879) |
26 |
@@ -25,19 +25,6 @@ |
27 |
PATH=$PORTAGE_BIN_PATH/ebuild-helpers:$PREROOTPATH${PREROOTPATH:+:}/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin${ROOTPATH:+:}$ROOTPATH |
28 |
export PATH |
29 |
|
30 |
-if [[ -z $PORTAGE_SETSID && -n $1 && $1 != depend ]] ; then |
31 |
- # If available, use setsid to create a new login session so that we can use |
32 |
- # SIGHUP to ensure that no orphaned subprocesses are left running. |
33 |
- if type -P setsid >/dev/null ; then |
34 |
- export PORTAGE_SETSID=1 |
35 |
- exec setsid "$PORTAGE_BIN_PATH/ebuild.sh" "$@" |
36 |
- elif [[ -x $PORTAGE_BIN_PATH/setsid ]] ; then |
37 |
- export PORTAGE_SETSID=1 |
38 |
- exec "$PORTAGE_BIN_PATH/setsid" "$PORTAGE_BIN_PATH/ebuild.sh" "$@" |
39 |
- fi |
40 |
-fi |
41 |
-[[ $PORTAGE_SETSID = 1 ]] && trap 'trap : SIGHUP ; kill -s SIGHUP 0 ;' EXIT |
42 |
- |
43 |
# These two functions wrap sourcing and calling respectively. At present they |
44 |
# perform a qa check to make sure eclasses and ebuilds and profiles don't mess |
45 |
# with shell opts (shopts). Ebuilds/eclasses changing shopts should reset them |
46 |
|
47 |
Modified: main/trunk/bin/isolated-functions.sh |
48 |
=================================================================== |
49 |
--- main/trunk/bin/isolated-functions.sh 2009-08-03 17:48:09 UTC (rev 13878) |
50 |
+++ main/trunk/bin/isolated-functions.sh 2009-08-03 20:13:17 UTC (rev 13879) |
51 |
@@ -536,8 +536,7 @@ |
52 |
PORTAGE_DEPCACHEDIR PORTAGE_GID PORTAGE_INST_GID \ |
53 |
PORTAGE_INST_UID PORTAGE_LOG_FILE PORTAGE_MASTER_PID \ |
54 |
PORTAGE_QUIET \ |
55 |
- PORTAGE_REPO_NAME PORTAGE_RESTRICT \ |
56 |
- PORTAGE_SETSID PORTAGE_UPDATE_ENV \ |
57 |
+ PORTAGE_REPO_NAME PORTAGE_RESTRICT PORTAGE_UPDATE_ENV \ |
58 |
PORTAGE_VERBOSE PORTAGE_WORKDIR_MODE PORTDIR \ |
59 |
PORTDIR_OVERLAY ${!PORTAGE_SANDBOX_*} PREROOTPATH \ |
60 |
PROFILE_PATHS PWORKDIR QA_INTERCEPTORS \ |
61 |
|
62 |
Deleted: main/trunk/bin/setsid |
63 |
=================================================================== |
64 |
--- main/trunk/bin/setsid 2009-08-03 17:48:09 UTC (rev 13878) |
65 |
+++ main/trunk/bin/setsid 2009-08-03 20:13:17 UTC (rev 13879) |
66 |
@@ -1,10 +0,0 @@ |
67 |
-#!/usr/bin/python -O |
68 |
-# Copyright 2009 Gentoo Foundation |
69 |
-# Distributed under the terms of the GNU General Public License v2 |
70 |
-# $Id$ |
71 |
- |
72 |
-import os |
73 |
-import sys |
74 |
- |
75 |
-os.setsid() |
76 |
-os.execl(sys.argv[1], *sys.argv[1:]) |
77 |
|
78 |
Modified: main/trunk/pym/portage/__init__.py |
79 |
=================================================================== |
80 |
--- main/trunk/pym/portage/__init__.py 2009-08-03 17:48:09 UTC (rev 13878) |
81 |
+++ main/trunk/pym/portage/__init__.py 2009-08-03 20:13:17 UTC (rev 13879) |
82 |
@@ -1048,7 +1048,6 @@ |
83 |
"EBUILD_PHASE", "EMERGE_FROM", "HOMEPAGE", "INHERITED", "IUSE", |
84 |
"KEYWORDS", "LICENSE", "PDEPEND", "PF", "PKGUSE", |
85 |
"PORTAGE_CONFIGROOT", "PORTAGE_IUSE", "PORTAGE_REPO_NAME", |
86 |
- "PORTAGE_SETSID", |
87 |
"PORTAGE_USE", "PROPERTIES", "PROVIDE", "RDEPEND", "RESTRICT", |
88 |
"ROOT", "SLOT", "SRC_URI" |
89 |
] |