Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-commits
Author: zmedico
Date: 2009-03-22 22:05:47 +0000 (Sun, 22 Mar 2009)
New Revision: 13144
Modified:
main/trunk/pym/portage/process.py
Log:
Inside spawn(), avoid redundant os.access() and stat() calls on commonly
spawned binaries such as BASH_BINARY, SANDBOX_BINARY, and FAKEROOT_BINARY.
Thanks to Piotr Jaroszy?\197?\132ski <peper@g.o> for reporting.
Modified: main/trunk/pym/portage/process.py
===================================================================
--- main/trunk/pym/portage/process.py 2009-03-22 21:31:23 UTC (rev 13143)
+++ main/trunk/pym/portage/process.py 2009-03-22 22:05:47 UTC (rev 13144)
@@ -181,7 +181,8 @@
# If an absolute path to an executable file isn't given
# search for it unless we've been told not to.
binary = mycommand[0]
- if (not os.path.isabs(binary) or not os.path.isfile(binary)
+ if binary not in (BASH_BINARY, SANDBOX_BINARY, FAKEROOT_BINARY) and \
+ (not os.path.isabs(binary) or not os.path.isfile(binary)
or not os.access(binary, os.X_OK)):
binary = path_lookup and find_binary(binary) or None
if not binary:
|
|