Make config.add_new_virtuals() work properly even if self.virtuals has previously...
authorZac Medico <zmedico@gentoo.org>
Mon, 6 Nov 2006 19:16:32 +0000 (19:16 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 6 Nov 2006 19:16:32 +0000 (19:16 -0000)
svn path=/main/trunk/; revision=4957

pym/portage.py

index fd11dc22ea9e10f12cb7b195ef30770305bd6a38..4d869931421e90d34c3a3d83a47b092e6cfb5618 100644 (file)
@@ -1876,7 +1876,9 @@ class config:
                                        cp = dep_getkey(cpv)
                                        new_virtuals[cp] = [cp]
                self._new_virtuals = new_virtuals
-               self.virtuals = self.getvirtuals()
+               # Make sure dirVirtuals and treeVirtuals are initialized.
+               self.getvirtuals()
+               self.virtuals = self.__getvirtuals_compile()
 
        def __delitem__(self,mykey):
                self.modifying()