public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r15583 - main/branches/2.1.7/pym/portage/dbapi
@ 2010-03-02 20:20 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2010-03-02 20:20 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2010-03-02 20:20:19 +0000 (Tue, 02 Mar 2010)
New Revision: 15583

Modified:
   main/branches/2.1.7/pym/portage/dbapi/porttree.py
Log:
Add a 'trees' parameter to portdbapi.cp_all(). Thanks to Brian Dolbec (dol-sen)
for this patch. (trunk r15356)

Modified: main/branches/2.1.7/pym/portage/dbapi/porttree.py
===================================================================
--- main/branches/2.1.7/pym/portage/dbapi/porttree.py	2010-03-02 20:20:05 UTC (rev 15582)
+++ main/branches/2.1.7/pym/portage/dbapi/porttree.py	2010-03-02 20:20:19 UTC (rev 15583)
@@ -901,13 +901,22 @@
 		else:
 			return 0
 
-	def cp_all(self, categories=None):
-		"returns a list of all keys in our tree"
+	def cp_all(self, categories=None, trees=None):
+		"""
+		This returns a list of all keys in our tree or trees
+		@param categories: optional list of categories to search or 
+			defaults to self.settings.categories
+		@param trees: optional list of trees to search the categories in or
+			defaults to self.porttrees
+		@rtype list of [cat/pkg,...]
+		"""
 		d = {}
 		if categories is None:
 			categories = self.settings.categories
+		if trees is None:
+			trees = self.porttrees
 		for x in categories:
-			for oroot in self.porttrees:
+			for oroot in trees:
 				for y in listdir(oroot+"/"+x, EmptyOnError=1, ignorecvs=1, dirsonly=1):
 					if not self._pkg_dir_name_re.match(y) or \
 						y == "CVS":




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-02 20:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-02 20:20 [gentoo-commits] portage r15583 - main/branches/2.1.7/pym/portage/dbapi Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox