From: Zac Medico Date: Thu, 30 Apr 2009 07:19:32 +0000 (-0000) Subject: Add --ask support to action_deselect(). (trunk r13365) X-Git-Tag: v2.1.6.12~52 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4a65c3087a42e526b195cf4c8602d1d0b124a7fa;p=portage.git Add --ask support to action_deselect(). (trunk r13365) svn path=/main/branches/2.1.6/; revision=13521 --- diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 7d22e0277..53e14db13 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -13911,6 +13911,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: