From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3773A1382C5 for ; Sun, 22 Apr 2018 21:52:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E785E0843; Sun, 22 Apr 2018 21:52:16 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 19789E0843 for ; Sun, 22 Apr 2018 21:52:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 387BD335C60 for ; Sun, 22 Apr 2018 21:52:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BC1F9294 for ; Sun, 22 Apr 2018 21:52:12 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1524421853.0dfa50e1d85aea0d63497fb823139541bc989e2e.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/EbuildBuild.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 0dfa50e1d85aea0d63497fb823139541bc989e2e X-VCS-Branch: master Date: Sun, 22 Apr 2018 21:52:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 05d08674-d17a-47e4-82ae-0558855e8794 X-Archives-Hash: 1d15bcce7fa5c397c1f1acb1b061852c commit: 0dfa50e1d85aea0d63497fb823139541bc989e2e Author: Zac Medico gentoo org> AuthorDate: Sat Apr 21 07:49:00 2018 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun Apr 22 18:30:53 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=0dfa50e1 EbuildBuild: use async_lock (bug 614112) Asynchronously lock the build directory, and use AsyncTaskFuture to fit the resulting future into the CompositeTask framework that EbuildBuild uses. Bug: https://bugs.gentoo.org/614112 pym/_emerge/EbuildBuild.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/EbuildBuild.py b/pym/_emerge/EbuildBuild.py index f1a2103a3..9d4afd0ea 100644 --- a/pym/_emerge/EbuildBuild.py +++ b/pym/_emerge/EbuildBuild.py @@ -150,8 +150,13 @@ class EbuildBuild(CompositeTask): self._build_dir = EbuildBuildDir( scheduler=self.scheduler, settings=settings) - self._build_dir.lock() + self._start_task( + AsyncTaskFuture(future=self._build_dir.async_lock()), + self._start_pre_clean) + def _start_pre_clean(self, lock_task): + self._assert_current(lock_task) + lock_task.future.result() # Cleaning needs to happen before fetch, since the build dir # is used for log handling. msg = " === (%s of %s) Cleaning (%s::%s)" % \