From 715904e3573a7c57c715f224d9182483d6756471 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 14 Aug 2006 06:42:12 +0000 Subject: Revert most of r4086 because it broke circular bootstrap dependencies for things like gwydion-dylan and ghc. Thanks to araujo for reporting the breakage. svn path=/main/trunk/; revision=4253 --- bin/emerge | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/emerge b/bin/emerge index 0c832e2a7..58044fe28 100755 --- a/bin/emerge +++ b/bin/emerge @@ -764,13 +764,6 @@ class depgraph: if addme and merging == 1: mybigkey.append("merge") - # Update old-style virtuals if this package provides any. These - # are needed for dep_virtual calls inside dep_check. - self.pkgsettings[myroot].setinst(mykey, - self.trees[myroot][self.pkg_tree_map[mytype]].dbapi) - # Update our fakedbapi state that is used for dep_wordreduce calls - # inside dep_check. - self.mydbapi[myroot].cpv_inject(mykey) else: mybigkey.append("nomerge") @@ -1026,6 +1019,32 @@ class depgraph: #we're processing a command-line argument; unconditionally merge it even if it's already merged mymerge=[depstring] + if myparent: + # In order to get past circular dependencies (in + # `emerge -e world`, for example), the parent must be allowed + # to satisfy dependencies of it's children. + + # The parent is added after it's own dep_check call so that it + # isn't allowed to satisfy a direct bootstrap dependency on itself + # or an old-style virtual that it satisfies (unfortunately, this + # only works for one level of deps, so it won't work for new-style + # virtuals since they introduce an additional level of dependency + # indirection). + + p_type, p_root, p_key, p_status = myparent.split() + if p_status == "merge" and \ + not self.mydbapi[p_root].cpv_exists(p_key): + # XXX Bug: This fakedbapi data is used in dep_check calls to + # determine satisfied deps via dep_wordreduce but it does not + # account for merge order (merge order is later calculated + # in self.altlist() using data from the digraph). + self.mydbapi[p_root].cpv_inject(p_key) + + # Update old-style virtuals if this package provides any. + # These are needed for dep_virtual calls inside dep_check. + self.pkgsettings[p_root].setinst(p_key, + self.trees[p_root][self.pkg_tree_map[p_type]].dbapi) + if not mymerge: return 1 -- cgit v1.2.3-1-g7c22