1 |
Author: zmedico |
2 |
Date: 2009-03-22 22:05:47 +0000 (Sun, 22 Mar 2009) |
3 |
New Revision: 13144 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/process.py |
7 |
Log: |
8 |
Inside spawn(), avoid redundant os.access() and stat() calls on commonly |
9 |
spawned binaries such as BASH_BINARY, SANDBOX_BINARY, and FAKEROOT_BINARY. |
10 |
Thanks to Piotr Jaroszy?\197?\132ski <peper@g.o> for reporting. |
11 |
|
12 |
|
13 |
Modified: main/trunk/pym/portage/process.py |
14 |
=================================================================== |
15 |
--- main/trunk/pym/portage/process.py 2009-03-22 21:31:23 UTC (rev 13143) |
16 |
+++ main/trunk/pym/portage/process.py 2009-03-22 22:05:47 UTC (rev 13144) |
17 |
@@ -181,7 +181,8 @@ |
18 |
# If an absolute path to an executable file isn't given |
19 |
# search for it unless we've been told not to. |
20 |
binary = mycommand[0] |
21 |
- if (not os.path.isabs(binary) or not os.path.isfile(binary) |
22 |
+ if binary not in (BASH_BINARY, SANDBOX_BINARY, FAKEROOT_BINARY) and \ |
23 |
+ (not os.path.isabs(binary) or not os.path.isfile(binary) |
24 |
or not os.access(binary, os.X_OK)): |
25 |
binary = path_lookup and find_binary(binary) or None |
26 |
if not binary: |