summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-04-30 07:19:32 +0000
committerZac Medico <zmedico@gentoo.org>2009-04-30 07:19:32 +0000
commit4a65c3087a42e526b195cf4c8602d1d0b124a7fa (patch)
treecd8c46fedc58cc7d29b8cc228e93aac005e2141b
parentFix bugs in action_deselect() and add --pretend support. (trunk r13364) (diff)
downloadportage-multirepo-4a65c3087a42e526b195cf4c8602d1d0b124a7fa.tar.gz
portage-multirepo-4a65c3087a42e526b195cf4c8602d1d0b124a7fa.tar.bz2
portage-multirepo-4a65c3087a42e526b195cf4c8602d1d0b124a7fa.zip
Add --ask support to action_deselect(). (trunk r13365)
svn path=/main/branches/2.1.6/; revision=13521
-rw-r--r--pym/_emerge/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 7d22e027..53e14db1 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: