From: Zac Medico Date: Sat, 25 Sep 2010 13:30:11 +0000 (-0700) Subject: Make BinpkgFetcher use AsynchronousLock. X-Git-Tag: v2.2_rc87~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=42b8ab977efc5db6653b328080bbe2a14dde8b64;p=portage.git Make BinpkgFetcher use AsynchronousLock. --- diff --git a/pym/_emerge/BinpkgFetcher.py b/pym/_emerge/BinpkgFetcher.py index 0032e601d..6fbce97dc 100644 --- a/pym/_emerge/BinpkgFetcher.py +++ b/pym/_emerge/BinpkgFetcher.py @@ -1,6 +1,7 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +from _emerge.AsynchronousLock import AsynchronousLock from _emerge.SpawnProcess import SpawnProcess try: from urllib.parse import urlparse as urllib_parse_urlparse @@ -139,8 +140,11 @@ class BinpkgFetcher(SpawnProcess): if self._lock_obj is not None: raise self.AlreadyLocked((self._lock_obj,)) - self._lock_obj = portage.locks.lockfile( - self.pkg_path, wantnewlockfile=1) + async_lock = AsynchronousLock(path=self.pkg_path, + scheduler=self.scheduler) + async_lock.start() + async_lock.wait() + self._lock_obj = async_lock.lock_obj self.locked = True class AlreadyLocked(portage.exception.PortageException):