diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-04-15 06:32:24 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-04-15 06:32:24 +0000 |
commit | eb4c6ccebbd23f958679478fdafc847854330ba6 (patch) | |
tree | c0ece356f95a0f65ee31b3a0c707a47b905f6f51 /bin/emerge | |
parent | 7e7449b67bc628f57d5fa5dcbc4ddf8a269b8dd3 (diff) | |
download | portage-eb4c6ccebbd23f958679478fdafc847854330ba6.tar.gz portage-eb4c6ccebbd23f958679478fdafc847854330ba6.tar.bz2 portage-eb4c6ccebbd23f958679478fdafc847854330ba6.zip |
Add support to depgraph._select_atoms() to take a "parent" parameter
and use that to try and avoid unresolvable direct circular dependencies
when necessary. Also, make atom selection more consistent with the
graph to solve some cases of bug #1343. This improves the fix from
bug #141118 to work in cases when a virtual is not yet installed but
it has been pulled into the graph. For example, see the case of
Bug #163801#c17, where we want kaffe to satisfy virtual/jdk-1.4
without an extra jvm being pulled in unnecessarily. (trunk r9901)
svn path=/main/branches/2.1.2/; revision=9903
Diffstat (limited to 'bin/emerge')
-rwxr-xr-x | bin/emerge | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/emerge b/bin/emerge index d0903559b..ad5cce225 100755 --- a/bin/emerge +++ b/bin/emerge @@ -1748,6 +1748,7 @@ class depgraph(object): pass filtered_tree.dbapi = self._dep_check_composite_db(self, myroot) self._filtered_trees[myroot]["porttree"] = filtered_tree + self._filtered_trees[myroot]["graph_db"] = graph_tree.dbapi # Passing in graph_tree as the vartree here could lead to better # atom selections in some cases by causing atoms for packages that @@ -2209,7 +2210,7 @@ class depgraph(object): vardb = self.roots[dep_root].trees["vartree"].dbapi try: selected_atoms = self._select_atoms(dep_root, - dep_string, myuse=myuse, strict=strict) + dep_string, myuse=myuse, parent=pkg, strict=strict) except portage_exception.InvalidDependString, e: show_invalid_depstring_notice(jbigkey, dep_string, str(e)) return 0 @@ -2675,7 +2676,7 @@ class depgraph(object): return self._select_atoms_highest_available(*pargs, **kwargs) def _select_atoms_highest_available(self, root, depstring, - myuse=None, strict=True, trees=None): + myuse=None, parent=None, strict=True, trees=None): """This will raise InvalidDependString if necessary. If trees is None then self._filtered_trees is used.""" pkgsettings = self.pkgsettings[root] @@ -2683,12 +2684,16 @@ class depgraph(object): trees = self._filtered_trees if True: try: + if parent is not None: + trees[root]["parent"] = parent if not strict: portage_dep._dep_check_strict = False mycheck = portage.dep_check(depstring, None, pkgsettings, myuse=myuse, myroot=root, trees=trees) finally: + if parent is not None: + trees[root].pop("parent") portage_dep._dep_check_strict = True if not mycheck[0]: raise portage_exception.InvalidDependString(mycheck[1]) |