Only create implicit libc deps when the version changes. (trunk r15810)
authorZac Medico <zmedico@gentoo.org>
Tue, 9 Mar 2010 21:27:32 +0000 (21:27 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 9 Mar 2010 21:27:32 +0000 (21:27 -0000)
svn path=/main/branches/2.1.7/; revision=15812

pym/_emerge/Scheduler.py
pym/_emerge/depgraph.py

index a6da7fee16fb386c6c5db7994619818e4c690332..d8eff9e5a2c97863dd4a38899b32f81d6c3093f5 100644 (file)
@@ -451,6 +451,16 @@ class Scheduler(PollScheduler):
                # Prefer new-style virtuals over old-style PROVIDE virtuals.
                libc_pkg_map = norm_libc_pkgs.copy()
                libc_pkg_map.update(virt_libc_pkgs)
+
+               # Only add a dep when the version changes.
+               for libc_pkg in list(libc_pkg_map.values()):
+                       if libc_pkg.root_config.trees['vartree'].dbapi.cpv_exists(
+                               libc_pkg.cpv):
+                               del libc_pkg_map[pkg.root]
+
+               if not libc_pkg_map:
+                       return
+
                libc_pkgs = set(libc_pkg_map.values())
                earlier_libc_pkgs = set()
 
index 9963c2fe07a65819972e97487ee5f30d72547651..a9b4ca5549d0a9eda76d54176a3e41752ddbf4cf 100644 (file)
@@ -3369,7 +3369,10 @@ class depgraph(object):
                        if libc_pkg:
                                libc_pkg = libc_pkg[0]
                                if libc_pkg.operation == 'merge':
-                                       asap_nodes.append(libc_pkg)
+                                       # Only add a dep when the version changes.
+                                       if not libc_pkg.root_config.trees[
+                                               'vartree'].dbapi.cpv_exists(libc_pkg.cpv):
+                                               asap_nodes.append(libc_pkg)
 
                def gather_deps(ignore_priority, mergeable_nodes,
                        selected_nodes, node):