Make --deselect handle all cases of atoms/sets on the cmd line and in @world (bug...
authorSebastian Luther <SebastianLuther@gmx.de>
Sat, 26 Jun 2010 05:14:17 +0000 (07:14 +0200)
committerZac Medico <zmedico@gentoo.org>
Sun, 27 Jun 2010 22:18:32 +0000 (15:18 -0700)
pym/_emerge/actions.py

index 9e2c88fe04ec1a917e0dfb19905a0b0c53a8a783..bc013483fd694cacc75689eb5f79a7a39357258d 100644 (file)
@@ -1182,11 +1182,13 @@ def action_deselect(settings, trees, opts, atoms):
                for atom in world_set:
                        for arg_atom in expanded_atoms:
                                if arg_atom.startswith(SETPREFIX):
-                                       if arg_atom == atom:
+                                       if atom.startswith(SETPREFIX) and \
+                                               arg_atom == atom:
                                                discard_atoms.add(atom)
                                                break
                                else:
-                                       if arg_atom.intersects(atom) and \
+                                       if not atom.startswith(SETPREFIX) and \
+                                               arg_atom.intersects(atom) and \
                                                not (arg_atom.slot and not atom.slot):
                                                discard_atoms.add(atom)
                                                break