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 1QPTxc-0003E8-Gr for garchives@archives.gentoo.org; Thu, 26 May 2011 06:22:21 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8D8331C4F6; Thu, 26 May 2011 06:18:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5EFF91C4F6 for ; Thu, 26 May 2011 06:18:28 +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 291C51B400B for ; Thu, 26 May 2011 06:18:28 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 8F6DE80508 for ; Thu, 26 May 2011 06:18:27 +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: Subject: [gentoo-commits] proj/portage:2.1.9 commit in: pym/_emerge/ X-VCS-Repository: proj/portage X-VCS-Files: pym/_emerge/main.py pym/_emerge/unmerge.py X-VCS-Directories: pym/_emerge/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: a891dbf9456a5ab93db28fafc45cfded2beaf8d0 Date: Thu, 26 May 2011 06:18:27 +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: 247b410906675e88e026293777d499f3 commit: a891dbf9456a5ab93db28fafc45cfded2beaf8d0 Author: Zac Medico gentoo org> AuthorDate: Sun May 15 05:21:08 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu May 26 02:51:04 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Da891dbf9 Use vardbapi.lock() where applicable. --- pym/_emerge/main.py | 5 +++-- pym/_emerge/unmerge.py | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 5e6c312..c1484f2 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -356,7 +356,8 @@ def post_emerge(myaction, myopts, myfiles, portage.util.ensure_dirs(vdb_path) vdb_lock =3D None if os.access(vdb_path, os.W_OK) and not "--pretend" in myopts: - vdb_lock =3D portage.locks.lockdir(vdb_path) + vardbapi.lock() + vdb_lock =3D True =20 if vdb_lock: try: @@ -366,7 +367,7 @@ def post_emerge(myaction, myopts, myfiles, mtimedb.commit() finally: if vdb_lock: - portage.locks.unlockdir(vdb_lock) + vardbapi.unlock() =20 chk_updated_cfg_files(settings['EROOT'], config_protect) =20 diff --git a/pym/_emerge/unmerge.py b/pym/_emerge/unmerge.py index 8fff516..5331744 100644 --- a/pym/_emerge/unmerge.py +++ b/pym/_emerge/unmerge.py @@ -11,6 +11,7 @@ from portage import os from portage.dbapi._expand_new_virt import expand_new_virt from portage.output import bold, colorize, darkgreen, green from portage._sets import SETPREFIX +from portage._sets.base import EditablePackageSet from portage.util import cmp_sort_key =20 from _emerge.emergelog import emergelog @@ -57,7 +58,8 @@ def unmerge(root_config, myopts, unmerge_action, vdb_lock =3D None try: if os.access(vdb_path, os.W_OK): - vdb_lock =3D portage.locks.lockdir(vdb_path) + vartree.dbapi.lock() + vdb_lock =3D True =20 realsyslist =3D [] for x in sets["system"].getAtoms(): @@ -293,10 +295,8 @@ def unmerge(root_config, myopts, unmerge_action, finally: if vdb_lock: vartree.dbapi.flush_cache() - portage.locks.unlockdir(vdb_lock) -=09 - from portage._sets.base import EditablePackageSet -=09 + vartree.dbapi.unlock() + # generate a list of package sets that are directly or indirectly liste= d in "selected", # as there is no persistent list of "installed" sets installed_sets =3D ["selected"]