From 46c4b2c9e611cc381ed4fd9bcc4e16ec903b24a7 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 19 Apr 2009 06:19:24 +0000 Subject: Add --ask support to action_deselect(). svn path=/main/trunk/; revision=13365 --- pym/_emerge/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pym') 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: -- cgit v1.2.3-1-g7c22