diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-02-17 00:01:36 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-02-17 00:01:36 +0100 |
commit | 62068bb37a5884af2049bf0061f7553b0a295c76 (patch) | |
tree | 8c0793852743018e8678c21d73e6058dcb6e1a22 /portato/gui | |
parent | 248cedb9524e6d10ecc86fd69cc609ec45fff660 (diff) | |
download | portato-62068bb37a5884af2049bf0061f7553b0a295c76.tar.gz portato-62068bb37a5884af2049bf0061f7553b0a295c76.tar.bz2 portato-62068bb37a5884af2049bf0061f7553b0a295c76.zip |
Do not add a package to the unmerge queue multiple times
Diffstat (limited to '')
-rw-r--r-- | portato/gui/queue.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/portato/gui/queue.py b/portato/gui/queue.py index 21ab8ca..4805129 100644 --- a/portato/gui/queue.py +++ b/portato/gui/queue.py @@ -22,7 +22,7 @@ from subprocess import Popen from .. import backend, plugin from ..backend import flags, system from ..backend.exceptions import BlockedException -from ..helper import debug, info, warning, send_signal_to_group, unique_array, flatten +from ..helper import debug, info, warning, error, send_signal_to_group, unique_array, flatten from ..waiting_queue import WaitingQueue from ..odict import OrderedDict from .updater import Updater @@ -300,9 +300,10 @@ class EmergeQueue: raise BlockedException(blocked, pkgs[0].get_cpv()) else: # unmerge - self.unmergequeue.append(cpv) - if self.tree: # update tree - self.iters["uninstall"][cpv] = self.tree.append(self.tree.get_unmerge_it(), self.tree.build_append_value(cpv)) + if cpv not in self.unmergequeue: + self.unmergequeue.append(cpv) + if self.tree: # update tree + self.iters["uninstall"][cpv] = self.tree.append(self.tree.get_unmerge_it(), self.tree.build_append_value(cpv)) def _queue_append (self, cpv, oneshot = False): """Convenience function appending a cpv either to self.mergequeue or to self.oneshotmerge. |