summaryrefslogtreecommitdiffstats
path: root/pym/portage/dbapi/_MergeProcess.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-10-25 02:32:35 -0700
committerZac Medico <zmedico@gentoo.org>2012-10-25 02:35:02 -0700
commitfa83d9cbe167f5fb54052f544cad4ddd7a264843 (patch)
tree7b784133258ebdb6d1d42b0b352bca6740770cbe /pym/portage/dbapi/_MergeProcess.py
parent10b6d0129d062f4d5d8a7611023c3f8cc43f1eab (diff)
downloadportage-fa83d9cbe167f5fb54052f544cad4ddd7a264843.tar.gz
portage-fa83d9cbe167f5fb54052f544cad4ddd7a264843.tar.bz2
portage-fa83d9cbe167f5fb54052f544cad4ddd7a264843.zip
MergeProcess: cache syncfs libc library lookup
Diffstat (limited to 'pym/portage/dbapi/_MergeProcess.py')
-rw-r--r--pym/portage/dbapi/_MergeProcess.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py
index 829a3d7ce..9be68d3f5 100644
--- a/pym/portage/dbapi/_MergeProcess.py
+++ b/pym/portage/dbapi/_MergeProcess.py
@@ -10,6 +10,7 @@ import errno
import fcntl
import portage
from portage import os, _unicode_decode
+from portage.dbapi.vartree import _get_syncfs
import portage.elog.messages
from portage.util._async.ForkProcess import ForkProcess
@@ -40,6 +41,11 @@ class MergeProcess(ForkProcess):
settings.reset()
settings.setcpv(cpv, mydb=self.mydbapi)
+ # This caches the libc library lookup in the current
+ # process, so that it's only done once rather than
+ # for each child process.
+ _get_syncfs()
+
# Inherit stdin by default, so that the pdb SIGUSR1
# handler is usable for the subprocess.
if self.fd_pipes is None: