From: Zac Medico Date: Sun, 19 Apr 2009 06:19:24 +0000 (-0000) Subject: Add --ask support to action_deselect(). X-Git-Tag: v2.2_rc31~7 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=46c4b2c9e611cc381ed4fd9bcc4e16ec903b24a7;p=portage.git Add --ask support to action_deselect(). svn path=/main/trunk/; revision=13365 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 004d13fdf..38ba17645 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -14087,6 +14087,13 @@ def action_deselect(settings, trees, opts, atoms): for atom in sorted(discard_atoms): print ">>> Removing %s from \"world\" favorites file..." % \ colorize("INFORM", str(atom)) + + if '--ask' in opts: + prompt = "Would you like to remove these " + \ + "packages from your world favorites?" + if userquery(prompt) == 'No': + return os.EX_OK + remaining = set(world_set) remaining.difference_update(discard_atoms) if not pretend: