diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-08-15 20:53:52 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-08-15 20:53:52 +0000 |
commit | c9b16e9d0e51401844c48cfa2d37e064e9ca4746 (patch) | |
tree | f7b139b8410e2aadca5169729fde1c1a7f9fdd28 /bin/emerge | |
parent | For bug #188782, keep "nomerge" nodes in the graph during the merge order cal... (diff) | |
download | portage-multirepo-c9b16e9d0e51401844c48cfa2d37e064e9ca4746.tar.gz portage-multirepo-c9b16e9d0e51401844c48cfa2d37e064e9ca4746.tar.bz2 portage-multirepo-c9b16e9d0e51401844c48cfa2d37e064e9ca4746.zip |
For bug #188782, 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. (branches/2.1.2 r7605)
svn path=/main/branches/2.1.2.9/; revision=7619
Diffstat (limited to 'bin/emerge')
-rwxr-xr-x | bin/emerge | 62 |
1 files changed, 38 insertions, 24 deletions
@@ -628,11 +628,11 @@ class DepPriority(object): SOFT The upper boundary for soft dependencies. MIN The lower boundary for soft dependencies. """ - __slots__ = ("__weakref__", "satisfied", "buildtime", "runtime", "runtime_post") + __slots__ = ("__weakref__", "satisfied", "buildtime", "runtime", "runtime_post", "rebuild") MEDIUM = -1 MEDIUM_SOFT = -2 SOFT = -3 - MIN = -5 + MIN = -6 def __init__(self, **kwargs): for myattr in self.__slots__: if myattr == "__weakref__": @@ -647,13 +647,15 @@ class DepPriority(object): return -1 if self.runtime_post: return -2 - if self.buildtime: + if self.rebuild: return -3 - if self.runtime: + if self.buildtime: return -4 - if self.runtime_post: + if self.runtime: return -5 - return -5 + if self.runtime_post: + return -6 + return -6 def __lt__(self, other): return self.__int__() < other def __le__(self, other): @@ -1065,24 +1067,7 @@ class depgraph: #"no downgrade" emerge """ mytype, myroot, mykey = mybigkey - existing_node = None - if addme: - existing_node = self.pkg_node_map[myroot].get(mykey) - if existing_node: - self._parent_child_digraph.add(existing_node, myparent) - if existing_node != myparent: - # Refuse to make a node depend on itself so that the we don't - # don't create a bogus circular dependency in self.altlist(). - if rev_dep and myparent: - self.digraph.addnode(myparent, existing_node, - priority=priority) - else: - self.digraph.addnode(existing_node, myparent, - priority=priority) - return 1 - - if "--nodeps" not in self.myopts: - self.spinner.update() + if mytype == "blocks": if myparent and \ "--buildpkgonly" not in self.myopts and \ @@ -1112,6 +1097,35 @@ class depgraph: self.pkgsettings[myroot].setcpv(mykey, mydb=portdb) myuse = self.pkgsettings[myroot]["USE"].split() + # normal arg, not system or world + if arg 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) + if existing_node: + self._parent_child_digraph.add(existing_node, myparent) + if existing_node != myparent: + # Refuse to make a node depend on itself so that the we don't + # don't create a bogus circular dependency in self.altlist(). + if rev_dep and myparent: + self.digraph.addnode(myparent, existing_node, + priority=priority) + else: + self.digraph.addnode(existing_node, myparent, + priority=priority) + return 1 + + if "--nodeps" not in self.myopts: + self.spinner.update() + merging=1 if mytype == "installed": merging = 0 |