Move the biolerplate cpv_all() implementation from portdbapi to dbapi.
authorZac Medico <zmedico@gentoo.org>
Wed, 13 Dec 2006 01:19:19 +0000 (01:19 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 13 Dec 2006 01:19:19 +0000 (01:19 -0000)
svn path=/main/trunk/; revision=5281

pym/portage.py

index 2d9d11d3f022274854e2a53395a4f6269db303a2..3e77d53c3723f2ba0f4837d64fd423848a3e1c2b 100644 (file)
@@ -4335,6 +4335,12 @@ class dbapi:
        def cp_list(self,cp,use_cache=1):
                return
 
+       def cpv_all(self):
+               cpv_list = []
+               for cp in self.cp_all():
+                       cpv_list.extend(self.cp_list(cp))
+               return cpv_list
+
        def aux_get(self,mycpv,mylist):
                "stub code for returning auxiliary db information, such as SLOT, DEPEND, etc."
                'input: "sys-apps/foo-1.0",["SLOT","DEPEND","HOMEPAGE"]'
@@ -5526,12 +5532,6 @@ class portdbapi(dbapi):
                l.sort()
                return l
 
-       def cpv_all(self):
-               cpv_list = []
-               for cp in self.cp_all():
-                       cpv_list.extend(self.cp_list(cp))
-               return cpv_list
-
        def p_list(self,mycp):
                d={}
                for oroot in self.porttrees: