1 |
bicatali 09/01/15 12:03:00 |
2 |
|
3 |
Added: scons-1.2.0-popen.patch scons-1.2.0-links.patch |
4 |
Log: |
5 |
Version bump and updated description |
6 |
(Portage version: 2.2_rc20/cvs/Linux 2.6.25-gentoo-r7 x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 dev-util/scons/files/scons-1.2.0-popen.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/scons/files/scons-1.2.0-popen.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/scons/files/scons-1.2.0-popen.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: scons-1.2.0-popen.patch |
15 |
=================================================================== |
16 |
--- engine/SCons/compat/__init__.py (revision 2695) |
17 |
+++ engine/SCons/compat/__init__.py (working copy) |
18 |
@@ -167,11 +167,17 @@ |
19 |
del shlex |
20 |
import_as('_scons_shlex', 'shlex') |
21 |
|
22 |
-try: |
23 |
- import subprocess |
24 |
-except ImportError: |
25 |
- # Pre-2.4 Python has no subprocess module. |
26 |
- import_as('_scons_subprocess', 'subprocess') |
27 |
+#try: |
28 |
+# import subprocess |
29 |
+#except ImportError: |
30 |
+# # Pre-2.4 Python has no subprocess module. |
31 |
+# import_as('_scons_subprocess', 'subprocess') |
32 |
+ |
33 |
+# Import subprocess unconditionally to avoid possible race conditions in |
34 |
+# the official subprocess API. If there are API versions without known |
35 |
+# problems, we can version-check and use the original subprocess module |
36 |
+# in these cases. |
37 |
+import_as('_scons_subprocess', 'subprocess') |
38 |
|
39 |
import sys |
40 |
try: |
41 |
|
42 |
|
43 |
--- engine/SCons/compat/_scons_subprocess.py (revision 2695) |
44 |
+++ engine/SCons/compat/_scons_subprocess.py (working copy) |
45 |
@@ -581,13 +581,19 @@ |
46 |
class object: |
47 |
pass |
48 |
|
49 |
+import thread |
50 |
+lock = thread.allocate_lock() |
51 |
+ |
52 |
class Popen(object): |
53 |
def __init__(self, args, bufsize=0, executable=None, |
54 |
stdin=None, stdout=None, stderr=None, |
55 |
preexec_fn=None, close_fds=False, shell=False, |
56 |
cwd=None, env=None, universal_newlines=False, |
57 |
startupinfo=None, creationflags=0): |
58 |
- """Create new Popen instance.""" |
59 |
+ """Create new Popen instance. |
60 |
+ Popen is not thread-safe and is therefore protected with a lock. |
61 |
+ """ |
62 |
+ lock.acquire() |
63 |
_cleanup() |
64 |
|
65 |
self._child_created = False |
66 |
@@ -655,6 +661,7 @@ |
67 |
self.stderr = os.fdopen(errread, 'rU', bufsize) |
68 |
else: |
69 |
self.stderr = os.fdopen(errread, 'rb', bufsize) |
70 |
+ lock.release() |
71 |
|
72 |
|
73 |
def _translate_newlines(self, data): |
74 |
|
75 |
|
76 |
|
77 |
1.1 dev-util/scons/files/scons-1.2.0-links.patch |
78 |
|
79 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/scons/files/scons-1.2.0-links.patch?rev=1.1&view=markup |
80 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/scons/files/scons-1.2.0-links.patch?rev=1.1&content-type=text/plain |
81 |
|
82 |
Index: scons-1.2.0-links.patch |
83 |
=================================================================== |
84 |
--- engine/SCons/Script/Main.py.orig 2009-01-15 11:07:33.000000000 +0000 |
85 |
+++ engine/SCons/Script/Main.py 2009-01-15 11:09:12.000000000 +0000 |
86 |
@@ -328,6 +328,10 @@ |
87 |
# then delete dir itself |
88 |
if remove: os.rmdir(path) |
89 |
display("Removed directory " + pathstr) |
90 |
+ else: |
91 |
+ if os.path.islink(path): |
92 |
+ if remove: os.unlink(path) |
93 |
+ display("Removed " + pathstr) |
94 |
except (IOError, OSError), e: |
95 |
print "scons: Could not remove '%s':" % pathstr, e.strerror |
96 |
|
97 |
--- engine/SCons/Tool/javac.py.orig 2009-01-15 11:05:46.000000000 +0000 |
98 |
+++ engine/SCons/Tool/javac.py 2009-01-15 11:06:41.000000000 +0000 |
99 |
@@ -94,6 +94,8 @@ |
100 |
version = env.get('JAVAVERSION', '1.4') |
101 |
full_tlist = [] |
102 |
for f in slist: |
103 |
+ if not os.path.exists(f.rfile().get_abspath()): |
104 |
+ continue |
105 |
tlist = [] |
106 |
source_file_based = True |
107 |
pkg_dir = None |