summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-12-28 14:44:34 -0800
committerZac Medico <zmedico@gentoo.org>2012-12-28 14:44:34 -0800
commit07f38da52b836127f0252982277945a985150c45 (patch)
treeb2a13069a095818eba5bb9a75307ec7acbb23a7d
parent9e37cca4f54260bd8c45a3041fcee00938c71649 (diff)
downloadportage-07f38da52b836127f0252982277945a985150c45.tar.gz
portage-07f38da52b836127f0252982277945a985150c45.tar.bz2
portage-07f38da52b836127f0252982277945a985150c45.zip
_MergeProcess: tweak merge-sync library lookup
The library handle is no longer cached, since commit 9e37cca4f54260bd8c45a3041fcee00938c71649, so skip the LoadLibrary call and just call find_library instead.
-rw-r--r--pym/portage/dbapi/_MergeProcess.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py
index cd9b122dc..e2534cf9d 100644
--- a/pym/portage/dbapi/_MergeProcess.py
+++ b/pym/portage/dbapi/_MergeProcess.py
@@ -2,6 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
import io
+import platform
import signal
import sys
import traceback
@@ -10,7 +11,7 @@ import errno
import fcntl
import portage
from portage import os, _unicode_decode
-from portage.dbapi.vartree import _get_syncfs
+from portage.util._ctypes import find_library
import portage.elog.messages
from portage.util._async.ForkProcess import ForkProcess
@@ -44,7 +45,9 @@ class MergeProcess(ForkProcess):
# 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()
+ if platform.system() == "Linux" and \
+ "merge-sync" in settings.features:
+ find_library("c")
# Inherit stdin by default, so that the pdb SIGUSR1
# handler is usable for the subprocess.