print()
def action_depclean(settings, trees, ldpath_mtimes,
- myopts, action, myfiles, spinner):
+ myopts, action, myfiles, spinner, scheduler=None):
# Kill packages that aren't explicitly merged or are required as a
# dependency of another package. World file is explicit.
if cleanlist:
unmerge(root_config, myopts, "unmerge",
- cleanlist, ldpath_mtimes, ordered=ordered)
+ cleanlist, ldpath_mtimes, ordered=ordered,
+ scheduler=scheduler)
if action == "prune":
return
for line in textwrap.wrap(msg, 72):
out.ewarn(line)
+ if action == 'deselect':
+ return action_deselect(settings, trees, opts, valid_atoms)
+
+ # Create a Schuduler for calls to unmerge(), in order to cause
+ # redirection of ebuild phase output to logs as required for
+ # options such as --quiet.
+ sched = Scheduler(settings, trees, None, opts,
+ spinner, [], [], None)
+ sched._background = sched._background_mode()
+ sched._status_display.quiet = True
+
if action in ('clean', 'unmerge') or \
(action == 'prune' and "--nodeps" in opts):
# When given a list of atoms, unmerge them in the order given.
ordered = action == 'unmerge'
unmerge(trees[settings["ROOT"]]['root_config'], opts, action,
- valid_atoms, ldpath_mtimes, ordered=ordered)
+ valid_atoms, ldpath_mtimes, ordered=ordered,
+ scheduler=sched._sched_iface)
rval = os.EX_OK
- elif action == 'deselect':
- rval = action_deselect(settings, trees, opts, valid_atoms)
else:
rval = action_depclean(settings, trees, ldpath_mtimes,
- opts, action, valid_atoms, spinner)
+ opts, action, valid_atoms, spinner, scheduler=sched._sched_iface)
return rval