summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-25 06:30:11 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-25 06:30:11 -0700
commit42b8ab977efc5db6653b328080bbe2a14dde8b64 (patch)
tree475b501a5408e2becaa1f38b173877bd61558e7b
parentFix catpkgsplit() to validate the category part. This fixes (diff)
downloadportage-42b8ab977efc5db6653b328080bbe2a14dde8b64.tar.gz
portage-42b8ab977efc5db6653b328080bbe2a14dde8b64.tar.bz2
portage-42b8ab977efc5db6653b328080bbe2a14dde8b64.zip
Make BinpkgFetcher use AsynchronousLock.
-rw-r--r--pym/_emerge/BinpkgFetcher.py10
1 files changed, 7 insertions, 3 deletions
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):