clone=trees[root]["vartree"].settings)
self.curval = 0
self._spawned_pids = []
+ self._uninstall_queue = []
def merge(self, mylist, favorites, mtimedb):
try:
pass
spawned_pids.remove(pid)
+ def _dequeue_uninstall_tasks(self, ldpath_mtimes):
+ if not self._uninstall_queue:
+ return
+ for uninst_task in self._uninstall_queue:
+ root_config = self.trees[uninst_task.root]["root_config"]
+ unmerge(root_config, self.myopts, "unmerge",
+ [uninst_task.cpv], ldpath_mtimes, clean_world=0)
+ del self._uninstall_queue[:]
+
def _merge(self, mylist, favorites, mtimedb):
from portage.elog import elog_process
from portage.elog.filtering import filter_mergephases
# Filter mymergelist so that all the len(mymergelist) calls
# below (for display) do not count Uninstall instances.
mymergelist = [x for x in mymergelist if x[-1] == "merge"]
- uninstall_queue = []
mergecount=0
for x in task_list:
pkg_type = x[0]
cpv=pkg_key, built=built, installed=installed,
metadata=metadata)
if pkg.installed:
- uninstall_queue.append(pkg)
+ self._uninstall_queue.append(pkg)
continue
if x[0]=="blocks":
# will help replacement packages get merged into place
# as soon as possible after a conflicting package is
# unmerged.
- if uninstall_queue:
- unmerge(root_config, self.myopts, "unmerge",
- [uninst_pkg.cpv for uninst_pkg in uninstall_queue],
- ldpath_mtimes, clean_world=0)
- del uninstall_queue[:]
+ self._dequeue_uninstall_tasks(ldpath_mtimes)
#buildsyspkg: Check if we need to _force_ binary package creation
issyspkg = ("buildsyspkg" in myfeat) \