From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: bin/, pym/portage/tests/
Date: Mon, 2 Jul 2012 19:14:05 +0000 (UTC) [thread overview]
Message-ID: <1341256434.7d6a0bc558bdfe5c3ca2b6e1638d1d4f31d2d8e1.zmedico@gentoo> (raw)
commit: 7d6a0bc558bdfe5c3ca2b6e1638d1d4f31d2d8e1
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 2 19:13:54 2012 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jul 2 19:13:54 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=7d6a0bc5
Don't use SIGUSR1 under Jython, bug #424259.
---
bin/ebuild | 9 ++++++++-
bin/ebuild-ipc.py | 11 +++++++++--
bin/emerge | 11 +++++++++--
pym/portage/tests/runTests | 11 +++++++++--
4 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/bin/ebuild b/bin/ebuild
index 35cdc14..65e5bef 100755
--- a/bin/ebuild
+++ b/bin/ebuild
@@ -4,6 +4,7 @@
from __future__ import print_function
+import platform
import signal
import sys
# This block ensures that ^C interrupts are handled quietly.
@@ -26,7 +27,13 @@ except KeyboardInterrupt:
def debug_signal(signum, frame):
import pdb
pdb.set_trace()
-signal.signal(signal.SIGUSR1, debug_signal)
+
+if platform.python_implementation() == 'Jython':
+ debug_signum = signal.SIGUSR2 # bug #424259
+else:
+ debug_signum = signal.SIGUSR1
+
+signal.signal(debug_signum, debug_signal)
import imp
import io
diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py
index 29d4c23..3caf2d1 100755
--- a/bin/ebuild-ipc.py
+++ b/bin/ebuild-ipc.py
@@ -1,5 +1,5 @@
#!/usr/bin/python
-# Copyright 2010-2011 Gentoo Foundation
+# Copyright 2010-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# This is a helper which ebuild processes can use
@@ -9,6 +9,7 @@ import errno
import logging
import os
import pickle
+import platform
import select
import signal
import sys
@@ -18,7 +19,13 @@ import traceback
def debug_signal(signum, frame):
import pdb
pdb.set_trace()
-signal.signal(signal.SIGUSR1, debug_signal)
+
+if platform.python_implementation() == 'Jython':
+ debug_signum = signal.SIGUSR2 # bug #424259
+else:
+ debug_signum = signal.SIGUSR1
+
+signal.signal(debug_signum, debug_signal)
# Avoid sandbox violations after python upgrade.
pym_path = os.path.join(os.path.dirname(
diff --git a/bin/emerge b/bin/emerge
index 6f69244..a9a5643 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -1,9 +1,10 @@
#!/usr/bin/python
-# Copyright 2006-2011 Gentoo Foundation
+# Copyright 2006-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
+import platform
import signal
import sys
# This block ensures that ^C interrupts are handled quietly.
@@ -26,7 +27,13 @@ except KeyboardInterrupt:
def debug_signal(signum, frame):
import pdb
pdb.set_trace()
-signal.signal(signal.SIGUSR1, debug_signal)
+
+if platform.python_implementation() == 'Jython':
+ debug_signum = signal.SIGUSR2 # bug #424259
+else:
+ debug_signum = signal.SIGUSR1
+
+signal.signal(debug_signum, debug_signal)
try:
from _emerge.main import emerge_main
diff --git a/pym/portage/tests/runTests b/pym/portage/tests/runTests
index 4c10087..91984a3 100755
--- a/pym/portage/tests/runTests
+++ b/pym/portage/tests/runTests
@@ -1,18 +1,25 @@
#!/usr/bin/python -Wd
# runTests.py -- Portage Unit Test Functionality
-# Copyright 2006 Gentoo Foundation
+# Copyright 2006-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import os, sys
import os.path as osp
import grp
+import platform
import pwd
import signal
def debug_signal(signum, frame):
import pdb
pdb.set_trace()
-signal.signal(signal.SIGUSR1, debug_signal)
+
+if platform.python_implementation() == 'Jython':
+ debug_signum = signal.SIGUSR2 # bug #424259
+else:
+ debug_signum = signal.SIGUSR1
+
+signal.signal(debug_signum, debug_signal)
# Pretend that the current user's uid/gid are the 'portage' uid/gid,
# so things go smoothly regardless of the current user and global
reply other threads:[~2012-07-02 19:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1341256434.7d6a0bc558bdfe5c3ca2b6e1638d1d4f31d2d8e1.zmedico@gentoo \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox