Ensure that binarytree.populate is called even when the first access is
authorJason Stubbs <jstubbs@gentoo.org>
Mon, 10 Apr 2006 12:07:51 +0000 (12:07 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Mon, 10 Apr 2006 12:07:51 +0000 (12:07 -0000)
via binarytree.dbapi.{aux_get,match}.

svn path=/main/trunk/; revision=3117

pym/portage.py

index 0021ea95a08b85018a1520432b70590fe63b36f6..2d4963da0d149037f8b3c88915f83a9275f8bba4 100644 (file)
@@ -4090,7 +4090,14 @@ class bindbapi(fakedbapi):
                self.cpvdict={}
                self.cpdict={}
 
+       def match(self, *pargs, **kwargs):
+               if self.bintree and not self.bintree.populated:
+                       self.bintree.populate()
+               return fakedbapi.match(self, *pargs, **kwargs)
+
        def aux_get(self,mycpv,wants):
+               if self.bintree and not self.bintree.populated:
+                       self.bintree.populate()
                mysplit = string.split(mycpv,"/")
                mylist  = []
                tbz2name = mysplit[1]+".tbz2"