public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r13144 - main/trunk/pym/portage
@ 2009-03-22 22:05 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-03-22 22:05 UTC (permalink / raw
  To: 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:




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-22 22:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-22 22:05 [gentoo-commits] portage r13144 - main/trunk/pym/portage Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox