From 184755e6f8e9fc040daff11e6f6b6ea9a60aad2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Wed, 16 Apr 2008 23:05:57 +0200 Subject: Correct handling of masked packages during update --- portato/gui/queue.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'portato/gui/queue.py') diff --git a/portato/gui/queue.py b/portato/gui/queue.py index 9627cef..3ac9246 100644 --- a/portato/gui/queue.py +++ b/portato/gui/queue.py @@ -170,10 +170,8 @@ class EmergeQueue: except backend.PackageNotFoundException, e: # package not found / package is masked -> delete current tree and re-raise the exception 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) + self.remove_with_children(self.tree.first_iter(it), removeNewFlags = False) + elif type == "install": # remove only the intentionally added package top = self.tree.first_iter(it) parent = self.tree.parent_iter(it) @@ -224,11 +222,10 @@ class EmergeQueue: @raises portato.backend.PackageNotFoundException: if trying to add a package which does not exist""" if type in ("install", "update"): # emerge - # insert dependencies - pkg = self._get_pkg_from_cpv(cpv, unmask) - deps = pkg.get_dep_packages() - if update: + pkg = self._get_pkg_from_cpv(cpv, unmask) + deps = pkg.get_dep_packages() + if not forceUpdate and cpv in self.deps[type] and deps == self.deps[type][cpv]: return # nothing changed - return else: -- cgit v1.2.3