Implement bindbapi.cpv_all() since the one from fakedbapi won't populate the tree.
authorZac Medico <zmedico@gentoo.org>
Thu, 31 May 2007 08:53:56 +0000 (08:53 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 31 May 2007 08:53:56 +0000 (08:53 -0000)
svn path=/main/trunk/; revision=6693

pym/portage/dbapi/bintree.py

index 198e0b5ab8b1be461f4593042eab7bd79f1dcfd4..fd62928942e4054c4b4db39bb3d21be2f618250f 100644 (file)
@@ -93,6 +93,11 @@ class bindbapi(fakedbapi):
                        self.bintree.populate()
                return fakedbapi.cp_all(self)
 
+       def cpv_all(self):
+               if not self.bintree.populated:
+                       self.bintree.populate()
+               return fakedbapi.cpv_all(self)
+
 class binarytree(object):
        "this tree scans for a list of all packages available in PKGDIR"
        def __init__(self, root, pkgdir, virtual=None, settings=None, clone=None):