diff options
-rw-r--r-- | pym/_emerge/main.py | 5 | ||||
-rw-r--r-- | 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 38afe7dfd..ee0fc4ed0 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 = None if os.access(vdb_path, os.W_OK) and not "--pretend" in myopts: - vdb_lock = portage.locks.lockdir(vdb_path) + vardbapi.lock() + vdb_lock = True 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() chk_updated_cfg_files(settings['EROOT'], config_protect) diff --git a/pym/_emerge/unmerge.py b/pym/_emerge/unmerge.py index 8fff516c1..533174499 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 from _emerge.emergelog import emergelog @@ -57,7 +58,8 @@ def unmerge(root_config, myopts, unmerge_action, vdb_lock = None try: if os.access(vdb_path, os.W_OK): - vdb_lock = portage.locks.lockdir(vdb_path) + vartree.dbapi.lock() + vdb_lock = True realsyslist = [] 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) - - from portage._sets.base import EditablePackageSet - + vartree.dbapi.unlock() + # generate a list of package sets that are directly or indirectly listed in "selected", # as there is no persistent list of "installed" sets installed_sets = ["selected"] |