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 1QLTmJ-000862-8T for garchives@archives.gentoo.org; Sun, 15 May 2011 05:22:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EE7681C009; Sun, 15 May 2011 05:21:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id BC5E01C009 for ; Sun, 15 May 2011 05:21:58 +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 3AAE21B405E for ; Sun, 15 May 2011 05:21:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 7ACC780504 for ; Sun, 15 May 2011 05:21:57 +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: <80145998591fc0dc51ab4a96a279fed40a04345a.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master 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: 80145998591fc0dc51ab4a96a279fed40a04345a Date: Sun, 15 May 2011 05:21:57 +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: d669721fb9b1918f935e69543bc4ecd5 commit: 80145998591fc0dc51ab4a96a279fed40a04345a Author: Zac Medico gentoo org> AuthorDate: Sun May 15 05:21:08 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun May 15 05:21:08 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D80145998 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 38afe7d..ee0fc4e 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"]