diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-05-01 20:09:33 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-05-01 20:09:33 -0700 |
commit | 60564a32c71ce9362e9329c7fd87783699c2c4b4 (patch) | |
tree | 53354dd6f374c8831def42bd2877910e8a26309d | |
parent | b33d96f3f60a494ff528a3bd0671a3d0fa6682e8 (diff) | |
download | portage-60564a32c71ce9362e9329c7fd87783699c2c4b4.tar.gz portage-60564a32c71ce9362e9329c7fd87783699c2c4b4.tar.bz2 portage-60564a32c71ce9362e9329c7fd87783699c2c4b4.zip |
depgraph: queue ignored deps for later traversal
This will fix an issue with some build-time deps being ignored by
--complete-graph in cases when --with-bdeps is not enabled. It
should help --rebuild to find more rebuilds in this case.
-rw-r--r-- | pym/_emerge/depgraph.py | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 24015414c..80d701cd6 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -374,6 +374,7 @@ class _dynamic_depgraph_config(object): self._autounmask = depgraph._frozen_config.myopts.get('--autounmask', 'n') == True self._success_without_autounmask = False + self._traverse_ignored_deps = False for myroot in depgraph._frozen_config.trees: self.sets[myroot] = _depgraph_sets() @@ -898,8 +899,9 @@ class depgraph(object): self._rebuild.add(dep_pkg, dep) - if (not dep.collapsed_priority.ignored and - not self._add_pkg(dep_pkg, dep)): + ignore = dep.collapsed_priority.ignored and \ + not self._dynamic_config._traverse_ignored_deps + if not ignore and not self._add_pkg(dep_pkg, dep): return 0 return 1 @@ -1300,7 +1302,7 @@ class depgraph(object): deps = ( (depend_root, edepend["DEPEND"], self._priority(buildtime=True, - optional=pkg.built, + optional=(pkg.built or ignore_build_time_deps), ignored=ignore_build_time_deps), pkg.built or ignore_build_time_deps), (myroot, edepend["RDEPEND"], @@ -1479,11 +1481,17 @@ class depgraph(object): self._dynamic_config._ignored_deps.append(dep) if not ignored: - if not self._add_dep(dep, - allow_unsatisfied=allow_unsatisfied): - return 0 - if is_virt and dep.child is not None: - traversed_virt_pkgs.add(dep.child) + if dep_priority.ignored: + if is_virt and dep.child is not None: + traversed_virt_pkgs.add(dep.child) + dep.child = None + self._dynamic_config._ignored_deps.append(dep) + else: + if not self._add_dep(dep, + allow_unsatisfied=allow_unsatisfied): + return 0 + if is_virt and dep.child is not None: + traversed_virt_pkgs.add(dep.child) selected_atoms.pop(pkg) @@ -1565,11 +1573,17 @@ class depgraph(object): self._dynamic_config._ignored_deps.append(dep) if not ignored: - if not self._add_dep(dep, - allow_unsatisfied=allow_unsatisfied): - return 0 - if is_virt and dep.child is not None: - traversed_virt_pkgs.add(dep.child) + if dep_priority.ignored: + if is_virt and dep.child is not None: + traversed_virt_pkgs.add(dep.child) + dep.child = None + self._dynamic_config._ignored_deps.append(dep) + else: + if not self._add_dep(dep, + allow_unsatisfied=allow_unsatisfied): + return 0 + if is_virt and dep.child is not None: + traversed_virt_pkgs.add(dep.child) if debug: writemsg_level("Exiting... %s\n" % (pkg,), @@ -3916,6 +3930,7 @@ class depgraph(object): # Make the graph as complete as possible by traversing build-time # dependencies if they happen to be installed already. self._dynamic_config.myparams["bdeps"] = "y" + self._dynamic_config._traverse_ignored_deps = True already_deep = self._dynamic_config.myparams.get("deep") is True if not already_deep: self._dynamic_config.myparams["deep"] = True |