diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-08-16 05:00:54 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-08-16 05:00:54 +0000 |
commit | 78ecf2c63ff89df9a8959df822765b5eb12ea872 (patch) | |
tree | aa01fa9a2c80b69916c398c86572c0ac3d082fa6 | |
parent | c9824349504513d3d84836c70306ba9c5e65b341 (diff) | |
download | portage-78ecf2c63ff89df9a8959df822765b5eb12ea872.tar.gz portage-78ecf2c63ff89df9a8959df822765b5eb12ea872.tar.bz2 portage-78ecf2c63ff89df9a8959df822765b5eb12ea872.zip |
Always assign higher priority to dependencies on packages that are being rebuilt (except when --emptytree is enabled since all packages are merged in that case). This optimizes merge order so that dependencies are rebuilt/updated as soon as possible.
svn path=/main/trunk/; revision=7625
-rw-r--r-- | pym/emerge/__init__.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index d37a8c2ec..aa38cfd27 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -1206,17 +1206,6 @@ class depgraph(object): return 0 del e - # normal arg, not system or world - if arg and len(self._sets) == 1 and \ - "selective" not in self.myparams: - # For revdep-rebuild, dependencies on packages specified as - # arguments are given higher priority since the currently - # installed version has been rendered useless by ABI breakage. - # It's okay to increase the priority here even if the caller - # is not revdep-rebuild. - if priority.satisfied: - priority.rebuild = True - existing_node = None if addme: existing_node = self.pkg_node_map[myroot].get(mykey) @@ -1333,6 +1322,19 @@ class depgraph(object): if reinstall_for_flags: self._reinstall_nodes[jbigkey] = reinstall_for_flags + if merging and \ + "empty" not in self.myparams and \ + vardbapi.match(slot_atom): + # Increase the priority of dependencies on packages that + # are being rebuilt. This optimizes merge order so that + # dependencies are rebuilt/updated as soon as possible, + # which is needed especially when emerge is called by + # revdep-rebuild since dependencies may be affected by ABI + # breakage that has rendered them useless. Don't adjust + # priority here when in "empty" mode since all packages + # are being merged in that case. + priority.rebuild = True + if rev_dep and myparent: self.digraph.addnode(myparent, jbigkey, priority=priority) |