Make config.setinst() and get_virts_p() call getvirtuals() in order
authorZac Medico <zmedico@gentoo.org>
Tue, 14 Sep 2010 00:05:16 +0000 (17:05 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 14 Sep 2010 00:05:16 +0000 (17:05 -0700)
to ensure that we don't trigger the _treeVirtuals assertion in
VirtualsManager._compile_virtuals().

pym/portage/package/ebuild/config.py

index fe2cc5497132216d1e51046d04e210f2da3afb2d..d920b7e2049c1e26d32f9bb3a697ebd095dbccd6 100644 (file)
@@ -1754,6 +1754,9 @@ class config(object):
                        myuse = mydbapi.aux_get(mycpv, ["USE"])[0]
                virts = use_reduce(provides, uselist=myuse.split(), flat=True)
 
+               # Ensure that we don't trigger the _treeVirtuals
+               # assertion in VirtualsManager._compile_virtuals().
+               self.getvirtuals()
                self._virtuals_manager.add_depgraph_virtuals(mycpv, virts)
 
        def reload(self):
@@ -2001,6 +2004,9 @@ class config(object):
                return self.getvirtuals()
 
        def get_virts_p(self):
+               # Ensure that we don't trigger the _treeVirtuals
+               # assertion in VirtualsManager._compile_virtuals().
+               self.getvirtuals()
                return self._virtuals_manager.get_virts_p()
 
        def getvirtuals(self):