diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-03-11 03:53:38 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-03-11 03:53:38 +0000 |
commit | c98efe1c7742fecea912f0e78c04f492621df65e (patch) | |
tree | e0a9ed02a7d0402dd328f03c728e113287b4e914 /pym | |
parent | 75d1469f1e44173bb260efee6532c77261b99d5e (diff) | |
download | portage-c98efe1c7742fecea912f0e78c04f492621df65e.tar.gz portage-c98efe1c7742fecea912f0e78c04f492621df65e.tar.bz2 portage-c98efe1c7742fecea912f0e78c04f492621df65e.zip |
Inside depgraph._select_atoms(), only trigger the circular dependency
avoidance code for buildtime dependencies. This solves a problem with
virtual/mysql inappropriately pulling in mysql-community from PDEPEND
when satisfying deps of plain mysql. Thanks to Krzysiek Pawlik <nelchael@g.o>
for reporting this issue:
http://archives.gentoo.org/gentoo-dev/msg_efce154d642fe6ede38d084a33c7f949.xml
(trunk r12599)
svn path=/main/branches/2.1.6/; revision=12880
Diffstat (limited to 'pym')
-rw-r--r-- | pym/_emerge/__init__.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 57509825b..1ba3341fa 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -5102,7 +5102,8 @@ class depgraph(object): vardb = self.roots[dep_root].trees["vartree"].dbapi try: selected_atoms = self._select_atoms(dep_root, - dep_string, myuse=myuse, parent=pkg, strict=strict) + dep_string, myuse=myuse, parent=pkg, strict=strict, + priority=dep_priority) except portage.exception.InvalidDependString, e: show_invalid_depstring_notice(jbigkey, dep_string, str(e)) return 0 @@ -5735,12 +5736,20 @@ class depgraph(object): return self._select_atoms_highest_available(*pargs, **kwargs) def _select_atoms_highest_available(self, root, depstring, - myuse=None, parent=None, strict=True, trees=None): + myuse=None, parent=None, strict=True, trees=None, priority=None): """This will raise InvalidDependString if necessary. If trees is None then self._filtered_trees is used.""" pkgsettings = self.pkgsettings[root] if trees is None: trees = self._filtered_trees + if not getattr(priority, "buildtime", False): + # The parent should only be passed to dep_check() for buildtime + # dependencies since that's the only case when it's appropriate + # to trigger the circular dependency avoidance code which uses it. + # It's important not to trigger the same circular dependency + # avoidance code for runtime dependencies since it's not needed + # and it can promote an incorrect package choice. + parent = None if True: try: if parent is not None: |