diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2008-04-15 13:56:07 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2008-04-15 13:56:07 +0200 |
commit | 9efcbd2805c439f34e5bdad1ac8ad05803d4a9cd (patch) | |
tree | 49a080e8b4b1f5f75861fc92f9cfd206d9b3a84e /portato | |
parent | 50ff892f17c325caf262f8704c8b375d28521f57 (diff) | |
download | portato-9efcbd2805c439f34e5bdad1ac8ad05803d4a9cd.tar.gz portato-9efcbd2805c439f34e5bdad1ac8ad05803d4a9cd.tar.bz2 portato-9efcbd2805c439f34e5bdad1ac8ad05803d4a9cd.zip |
Fixed the accidential removal of packages in the install queue if one is masked.
Diffstat (limited to '')
-rw-r--r-- | portato/gui/queue.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/portato/gui/queue.py b/portato/gui/queue.py index 76db6b2..9627cef 100644 --- a/portato/gui/queue.py +++ b/portato/gui/queue.py @@ -169,10 +169,22 @@ class EmergeQueue: changedUse.append("+"+i) except backend.PackageNotFoundException, e: # package not found / package is masked -> delete current tree and re-raise the exception - if self.tree.iter_has_parent(it): - while self.tree.iter_has_parent(it): + if type == "update": # remove complete tree + if self.tree.iter_has_parent(it): + while self.tree.iter_has_parent(it): + it = self.tree.parent_iter(it) + self.remove_with_children(it, removeNewFlags = False) + elif type == "install": # remove only the intentionally added package + top = self.tree.first_iter(it) + parent = self.tree.parent_iter(it) + while not self.tree.iter_equal(top, parent): + parent = self.tree.parent_iter(parent) it = self.tree.parent_iter(it) + self.remove_with_children(it, removeNewFlags = False) + + if not self.tree.iter_has_children(top): # remove completely if nothing left + self.remove(top) raise # add iter |