summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--geneticone/backend/portage_helper.py19
-rw-r--r--geneticone/gui/gui_helper.py10
-rw-r--r--geneticone/gui/windows.py2
3 files changed, 28 insertions, 3 deletions
diff --git a/geneticone/backend/portage_helper.py b/geneticone/backend/portage_helper.py
index 3a6eab7..3d5a4a8 100644
--- a/geneticone/backend/portage_helper.py
+++ b/geneticone/backend/portage_helper.py
@@ -255,9 +255,26 @@ def update_world (newuse = False, deep = False):
line = line.strip()
if not len(line): continue # empty line
if line[0] == "#": continue
- packages.append(find_best_match(line))
+ packages.append(line)
world.close()
+ sys = gentoolkit.settings.packages
+ for x in sys:
+ if x[0] == "*":
+ x = x[1:]
+ packages.append(x.strip())
+
+ # Remove everything that is package.provided from our list
+ # This is copied from emerge.getlist()
+ for atom in packages[:]:
+ for expanded_atom in portage.flatten(portage.dep_virtual([atom], gentoolkit.settings)):
+ mykey = portage.dep_getkey(expanded_atom)
+ if mykey in gentoolkit.settings.pprovideddict and portage.match_from_list(expanded_atom, settings.pprovideddict[mykey]):
+ packages.remove(atom)
+ break
+
+ packages = [find_best_match(x) for x in packages]
+
checked = []
updating = []
raw_checked = []
diff --git a/geneticone/gui/gui_helper.py b/geneticone/gui/gui_helper.py
index cb32417..51f04e3 100644
--- a/geneticone/gui/gui_helper.py
+++ b/geneticone/gui/gui_helper.py
@@ -282,7 +282,7 @@ class EmergeQueue:
return pkg
- def update_tree (self, it, cpv, unmask = False, options = []):
+ def update_tree (self, it, cpv, unmask = False, options = None):
"""This updates the tree recursivly, or? Isn't it? Bjorn!
@param it: iterator where to append
@@ -297,11 +297,19 @@ class EmergeQueue:
@raises backend.BlockedException: When occured during dependency-calculation.
@raises backend.PackageNotFoundException: If no package could be found - normally it is existing but masked."""
+ if not options: options = []
+
if cpv in self.deps:
return # in list already and therefore it's already in the tree too
try:
pkg = self._get_pkg_from_cpv(cpv, unmask)
+ if not pkg.is_installed():
+ old = backend.get_all_installed_versions(pkg.get_cp())
+ if old:
+ old = old[0] # assume we have only one there; FIXME: slotted packages
+ options += ["updating from "+old.get_version()]
+
except backend.PackageNotFoundException, e: # package not found / package is masked -> delete current tree and re-raise the exception
if self.tree.iter_parent(it):
while self.tree.iter_parent(it):
diff --git a/geneticone/gui/windows.py b/geneticone/gui/windows.py
index ade3fa9..81a82cf 100644
--- a/geneticone/gui/windows.py
+++ b/geneticone/gui/windows.py
@@ -954,7 +954,7 @@ class MainWindow:
debug("updating list:", [(x.get_cpv(), y.get_cpv()) for x,y in updating])
for pkg, old_pkg in updating:
- self.queue.append(pkg.get_cpv(), options=["update from "+old_pkg.get_version()])
+ self.queue.append(pkg.get_cpv())
if len(updating): self.doUpdate = True
return True