diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-04-19 06:19:24 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-04-19 06:19:24 +0000 |
commit | 46c4b2c9e611cc381ed4fd9bcc4e16ec903b24a7 (patch) | |
tree | 579a8ebf2b73f09cf8c2e4acfd1c906b3536473d | |
parent | c1a3d7b49f487ec6865d57697efd9ec750d2bc7f (diff) | |
download | portage-46c4b2c9e611cc381ed4fd9bcc4e16ec903b24a7.tar.gz portage-46c4b2c9e611cc381ed4fd9bcc4e16ec903b24a7.tar.bz2 portage-46c4b2c9e611cc381ed4fd9bcc4e16ec903b24a7.zip |
Add --ask support to action_deselect().
svn path=/main/trunk/; revision=13365
-rw-r--r-- | pym/_emerge/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
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: |