1 |
Author: zmedico |
2 |
Date: 2009-03-23 02:20:42 +0000 (Mon, 23 Mar 2009) |
3 |
New Revision: 13161 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.6/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. (trunk r13144) |
11 |
|
12 |
Modified: main/branches/2.1.6/pym/portage/process.py |
13 |
=================================================================== |
14 |
--- main/branches/2.1.6/pym/portage/process.py 2009-03-23 02:20:15 UTC (rev 13160) |
15 |
+++ main/branches/2.1.6/pym/portage/process.py 2009-03-23 02:20:42 UTC (rev 13161) |
16 |
@@ -181,7 +181,8 @@ |
17 |
# If an absolute path to an executable file isn't given |
18 |
# search for it unless we've been told not to. |
19 |
binary = mycommand[0] |
20 |
- if (not os.path.isabs(binary) or not os.path.isfile(binary) |
21 |
+ if binary not in (BASH_BINARY, SANDBOX_BINARY, FAKEROOT_BINARY) and \ |
22 |
+ (not os.path.isabs(binary) or not os.path.isfile(binary) |
23 |
or not os.access(binary, os.X_OK)): |
24 |
binary = path_lookup and find_binary(binary) or None |
25 |
if not binary: |