From: Zac Medico Date: Wed, 2 Aug 2006 06:02:03 +0000 (-0000) Subject: Move code that updates depgraph state from select_dep() to a more appropriate locatio... X-Git-Tag: v2.1.1~112 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=33ebcb7bf95c7a67230a3d45e22227217746d5fd;p=portage.git Move code that updates depgraph state from select_dep() to a more appropriate location in create(). This fixes a bug in $ROOT handling, where the the $ROOT of the child is used where the $ROOT of the parent should have been (similar to bug #108449). svn path=/main/trunk/; revision=4086 --- diff --git a/bin/emerge b/bin/emerge index 8b6d85fb1..66f1fa491 100755 --- a/bin/emerge +++ b/bin/emerge @@ -761,6 +761,13 @@ 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") @@ -1016,17 +1023,6 @@ class depgraph: #we're processing a command-line argument; unconditionally merge it even if it's already merged mymerge=[depstring] - # dep_check has been run so we can now add our parent to our - # build state to update virtuals and other settings. This - # happens after the package is added to the tree so that a - # package can depend on a virtual which it satisfies. - if myparent: - myp = myparent.split() - if myp[3]=="merge": - self.mydbapi[myroot].cpv_inject(myp[2]) - pkgsettings.setinst(myp[2], - self.trees[myroot][self.pkg_tree_map[myp[0]]].dbapi) - if not mymerge: return 1