From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QIxQq-0005k1-7Y for garchives@archives.gentoo.org; Sun, 08 May 2011 06:25:32 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A5F1E1C001; Sun, 8 May 2011 06:25:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 77BA51C001 for ; Sun, 8 May 2011 06:25:24 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 034DF1B4016 for ; Sun, 8 May 2011 06:25:24 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id F3A0645B2A for ; Sun, 8 May 2011 06:25:22 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <09cb0079ee6da6fef3eea1043f3e75e89ec954d7.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/FakeVartree.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 09cb0079ee6da6fef3eea1043f3e75e89ec954d7 Date: Sun, 8 May 2011 06:25:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: c756eb5c7566131cf77a486dbf9d9c1f commit: 09cb0079ee6da6fef3eea1043f3e75e89ec954d7 Author: David James chromium org> AuthorDate: Sun May 8 06:08:01 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun May 8 06:24:18 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D09cb0079 Use new vardbapi lock function in FakeVartree. BUG=3Dnone TEST=3DMerged some packages with new code. Ran test suite. Change-Id: Ibb9380122631bf6c79e39691233cfd641931b75a --- pym/_emerge/FakeVartree.py | 17 ++++++----------- 1 files changed, 6 insertions(+), 11 deletions(-) diff --git a/pym/_emerge/FakeVartree.py b/pym/_emerge/FakeVartree.py index fa490c2..ff092ad 100644 --- a/pym/_emerge/FakeVartree.py +++ b/pym/_emerge/FakeVartree.py @@ -119,20 +119,15 @@ class FakeVartree(vartree): after one or more packages may have been installed or uninstalled. """ - vdb_path =3D os.path.join(self.settings['EROOT'], portage.VDB_PATH) + locked =3D False try: - # At least the parent needs to exist for the lock file. - portage.util.ensure_dirs(vdb_path) - except portage.exception.PortageException: - pass - vdb_lock =3D None - try: - if acquire_lock and os.access(vdb_path, os.W_OK): - vdb_lock =3D portage.locks.lockdir(vdb_path) + if acquire_lock and os.access(self._real_vardb._dbroot, os.W_OK): + self._real_vardb.lock() + locked =3D True self._sync() finally: - if vdb_lock: - portage.locks.unlockdir(vdb_lock) + if locked: + self._real_vardb.unlock() =20 # Populate the old-style virtuals using the cached values. # Skip the aux_get wrapper here, to avoid unwanted