summaryrefslogtreecommitdiff
path: root/portato/gui/queue.py
diff options
context:
space:
mode:
Diffstat (limited to 'portato/gui/queue.py')
-rw-r--r--portato/gui/queue.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/portato/gui/queue.py b/portato/gui/queue.py
index 5a414a2..d7b1e3f 100644
--- a/portato/gui/queue.py
+++ b/portato/gui/queue.py
@@ -3,7 +3,7 @@
# File: portato/gui/queue.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2008 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
@@ -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
@@ -191,14 +191,14 @@ class EmergeQueue:
self.remove(top)
raise
- # add iter
- subIt = self.tree.append(it, self.tree.build_append_value(cpv, oneshot = oneshot, update = update, downgrade = downgrade, version = uVersion, useChange = changedUse))
- self.iters[type][cpv] = subIt
-
# get dependencies
deps = pkg.get_dep_packages(return_blocks = True)
self.deps[type][cpv] = deps
+ # add iter
+ subIt = self.tree.append(it, self.tree.build_append_value(cpv, oneshot = oneshot, update = update, downgrade = downgrade, version = uVersion, useChange = changedUse))
+ self.iters[type][cpv] = subIt
+
for d in deps:
if d[0] == "!": # block
dep = d[1:]
@@ -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.