summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/depgraph.py22
-rw-r--r--pym/_emerge/search.py8
2 files changed, 19 insertions, 11 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index 9066a59e4..c1b789966 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -177,7 +177,7 @@ class _dynamic_depgraph_config(object):
fakedb = PackageVirtualDbapi(vardb.settings)
if preload_installed_pkgs:
for pkg in vardb:
- depgraph._frozen_config.spinner.update()
+ depgraph._spinner_update()
# This triggers metadata updates via FakeVartree.
vardb.aux_get(pkg.cpv, [])
fakedb.cpv_inject(pkg)
@@ -266,6 +266,10 @@ class depgraph(object):
self._select_atoms = self._select_atoms_highest_available
self._select_package = self._select_pkg_highest_available
+ def _spinner_update(self):
+ if self._frozen_config.spinner:
+ self._frozen_config.spinner.update()
+
def _show_missed_update(self):
if '--quiet' in self._frozen_config.myopts and \
@@ -598,7 +602,7 @@ class depgraph(object):
dep_stack = self._dynamic_config._dep_stack
dep_disjunctive_stack = self._dynamic_config._dep_disjunctive_stack
while dep_stack or dep_disjunctive_stack:
- self._frozen_config.spinner.update()
+ self._spinner_update()
while dep_stack:
dep = dep_stack.pop()
if isinstance(dep, Package):
@@ -894,7 +898,7 @@ class depgraph(object):
elif pkg.installed and not recurse:
dep_stack = self._dynamic_config._ignored_deps
- self._frozen_config.spinner.update()
+ self._spinner_update()
if not previously_added:
dep_stack.append(pkg)
@@ -1492,7 +1496,7 @@ class depgraph(object):
virtuals = pkgsettings.getvirtuals()
for arg in self._dynamic_config._initial_arg_list:
for atom in arg.set:
- self._frozen_config.spinner.update()
+ self._spinner_update()
dep = Dependency(atom=atom, onlydeps=onlydeps,
root=myroot, parent=arg)
atom_cp = portage.dep_getkey(atom)
@@ -2476,7 +2480,7 @@ class depgraph(object):
# If this node has any blockers, create a "nomerge"
# node for it so that they can be enforced.
- self._frozen_config.spinner.update()
+ self._spinner_update()
blocker_data = blocker_cache.get(cpv)
if blocker_data is not None and \
blocker_data.counter != long(pkg.metadata["COUNTER"]):
@@ -2572,7 +2576,7 @@ class depgraph(object):
self._dynamic_config.digraph.difference_update(previous_uninstall_tasks)
for blocker in self._dynamic_config._blocker_parents.leaf_nodes():
- self._frozen_config.spinner.update()
+ self._spinner_update()
root_config = self._frozen_config.roots[blocker.root]
virtuals = root_config.settings.getvirtuals()
myroot = blocker.root
@@ -2846,7 +2850,7 @@ class depgraph(object):
node.installed or node.onlydeps:
removed_nodes.add(node)
if removed_nodes:
- self._frozen_config.spinner.update()
+ self._spinner_update()
mygraph.difference_update(removed_nodes)
if not removed_nodes:
break
@@ -2994,7 +2998,7 @@ class depgraph(object):
# unresolved blockers or circular dependencies.
while not mygraph.empty():
- self._frozen_config.spinner.update()
+ self._spinner_update()
selected_nodes = None
ignore_priority = None
if drop_satisfied or (prefer_asap and asap_nodes):
@@ -4540,7 +4544,7 @@ class depgraph(object):
fakedb[myroot].cpv_inject(pkg)
serialized_tasks.append(pkg)
- self._frozen_config.spinner.update()
+ self._spinner_update()
if self._dynamic_config._unsatisfied_deps_for_display:
return False
diff --git a/pym/_emerge/search.py b/pym/_emerge/search.py
index bcb31e474..96b3398b0 100644
--- a/pym/_emerge/search.py
+++ b/pym/_emerge/search.py
@@ -67,6 +67,10 @@ class search(object):
self._dbs.append(vardb)
self._portdb = portdb
+ def _spinner_update(self):
+ if self.spinner:
+ self.spinner.update()
+
def _cp_all(self):
cp_all = set()
for db in self._dbs:
@@ -202,7 +206,7 @@ class search(object):
else:
self.searchre=re.compile(re.escape(self.searchkey), re.I)
for package in self.portdb.cp_all():
- self.spinner.update()
+ self._spinner_update()
if match_category:
match_string = package[:]
@@ -235,7 +239,7 @@ class search(object):
self.sdict = self.setconfig.getSets()
for setname in self.sdict:
- self.spinner.update()
+ self._spinner_update()
if match_category:
match_string = setname
else: