summaryrefslogtreecommitdiff
path: root/portato
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/backend/package.py8
-rw-r--r--portato/backend/portage_helper.py12
-rw-r--r--portato/gui/gtk/windows.py6
3 files changed, 16 insertions, 10 deletions
diff --git a/portato/backend/package.py b/portato/backend/package.py
index 15dd59a..436b5e1 100644
--- a/portato/backend/package.py
+++ b/portato/backend/package.py
@@ -260,7 +260,7 @@ class Package:
return retlist
- def get_dep_packages (self):
+ def get_dep_packages (self, depvar = ["RDEPEND", "PDEPEND", "DEPEND"]):
"""Returns a cpv-list of packages on which this package depends and which have not been installed yet. This does not check the dependencies in a recursive manner.
@returns: list of cpvs on which the package depend
@@ -282,9 +282,13 @@ class Package:
elif u not in actual:
actual.append(u)
+ depstring = ""
+ for d in depvar:
+ depstring += self.get_env_var(d)+" "
+
# let portage do the main stuff ;)
# pay attention to any changes here
- deps = portage.dep_check (self.get_env_var("RDEPEND")+" "+self.get_env_var("DEPEND")+" "+self.get_env_var("PDEPEND"), portage_settings.vartree.dbapi, self._settings, myuse = actual, trees = self._trees)
+ deps = portage.dep_check (depstring, portage_settings.vartree.dbapi, self._settings, myuse = actual, trees = self._trees)
if not deps: # FIXME: what is the difference to [1, []] ?
return []
diff --git a/portato/backend/portage_helper.py b/portato/backend/portage_helper.py
index 6cfe25a..a215b51 100644
--- a/portato/backend/portage_helper.py
+++ b/portato/backend/portage_helper.py
@@ -352,7 +352,7 @@ def update_world (newuse = False, deep = False):
checked = []
updating = []
raw_checked = []
- def check (p, warn_no_installed = True):
+ def check (p, add_not_installed = True):
"""Checks whether a package is updated or not."""
if p.get_cp() in checked: return
else: checked.append(p.get_cp())
@@ -367,16 +367,18 @@ def update_world (newuse = False, deep = False):
else:
oldList = sort_package_list(find_installed_packages(p.get_cp()))
if not oldList:
- if warn_no_installed:
- debug("Bug? Not found installed one:",p.get_cp())
- return
+ if add_not_installed:
+ debug("Not found installed",p.get_cpv(),"==> adding")
+ oldList = [p]
+ else:
+ return
old = oldList[-1]
updating.append((p, old))
appended = True
p = old
- if newuse and p.is_in_system(): # there is no use to check newuse for a package which is not existing in portage anymore :)
+ if newuse and p.is_installed() and p.is_in_system(): # there is no use to check newuse for a package which is not existing in portage anymore :)
new_iuse = set(p.get_all_use_flags(installed = False)) # IUSE in the ebuild
old_iuse = set(p.get_all_use_flags(installed = True)) # IUSE in the vardb
diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py
index 239606a..3f6a55f 100644
--- a/portato/gui/gtk/windows.py
+++ b/portato/gui/gtk/windows.py
@@ -779,7 +779,7 @@ class MainWindow (Window):
else:
updating = backend.update_world(newuse = self.cfg.get_boolean("newuse_opt"), deep = self.cfg.get_boolean("deep_opt"))
- debug("updating list:", [(x.get_cpv(), y.get_cpv()) for x,y in updating])
+ debug("updating list:", [(x.get_cpv(), y.get_cpv()) for x,y in updating],"--> length:",len(updating))
try:
try:
for pkg, old_pkg in updating:
@@ -791,6 +791,7 @@ class MainWindow (Window):
except BlockedException, e:
blocked_dialog(e[0], e[1])
+ self.queue.remove_children(self.queue.emergeIt)
if len(updating): self.doUpdate = True
return True
@@ -812,8 +813,7 @@ class MainWindow (Window):
elif model.iter_parent(model.iter_parent(iter)): # this is in the 3rd level => dependency
remove_deps_dialog()
else:
- self.queue.remove_children(iter) # remove children first
- self.queue.remove(iter)
+ self.queue.remove_with_children(iter)
self.doUpdate = False
return True