From 07f38da52b836127f0252982277945a985150c45 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 28 Dec 2012 14:44:34 -0800 Subject: _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. --- pym/portage/dbapi/_MergeProcess.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'pym') 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. -- cgit v1.2.3-1-g7c22