From 6a84f13aecc3f3da5a1f3b0b8fa33206e62f09bc Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 9 Mar 2010 21:27:32 +0000 Subject: [PATCH] Only create implicit libc deps when the version changes. (trunk r15810) svn path=/main/branches/2.1.7/; revision=15812 --- pym/_emerge/Scheduler.py | 10 ++++++++++ pym/_emerge/depgraph.py | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pym/_emerge/Scheduler.py b/pym/_emerge/Scheduler.py index a6da7fee1..d8eff9e5a 100644 --- a/pym/_emerge/Scheduler.py +++ b/pym/_emerge/Scheduler.py @@ -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() diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 9963c2fe0..a9b4ca554 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -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): -- 2.26.2