From 62cbda66a40db1282cd9d8acae201b31c2ed1dfb Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 23 Mar 2009 02:20:42 +0000 Subject: =?UTF-8?q?Inside=20spawn(),=20avoid=20redundant=20os.access()=20a?= =?UTF-8?q?nd=20stat()=20calls=20on=20commonly=20spawned=20binaries=20such?= =?UTF-8?q?=20as=20BASH=5FBINARY,=20SANDBOX=5FBINARY,=20and=20FAKEROOT=5FB?= =?UTF-8?q?INARY.=20Thanks=20to=20Piotr=20Jaroszy=C5=84ski=20?= =?UTF-8?q?=20for=20reporting.=20(trunk=20r13144)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit svn path=/main/branches/2.1.6/; revision=13161 --- pym/portage/process.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pym/portage/process.py b/pym/portage/process.py index 6f449c3d6..a88f5bf28 100644 --- a/pym/portage/process.py +++ b/pym/portage/process.py @@ -181,7 +181,8 @@ def spawn(mycommand, env={}, opt_name=None, fd_pipes=None, returnpid=False, # 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: -- cgit v1.2.3-1-g7c22