public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r9988 - main/branches/2.1.2/bin
@ 2008-04-27  0:26 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-04-27  0:26 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-04-27 00:26:28 +0000 (Sun, 27 Apr 2008)
New Revision: 9988

Modified:
   main/branches/2.1.2/bin/emerge
Log:
Add a PackageVirtualDbapi.copy() method. (trunk r9982)


Modified: main/branches/2.1.2/bin/emerge
===================================================================
--- main/branches/2.1.2/bin/emerge	2008-04-27 00:25:51 UTC (rev 9987)
+++ main/branches/2.1.2/bin/emerge	2008-04-27 00:26:28 UTC (rev 9988)
@@ -1652,6 +1652,15 @@
 		self._cp_map = {}
 		self._cpv_map = {}
 
+	def copy(self):
+		obj = PackageVirtualDbapi(self.settings)
+		obj._match_cache = self._match_cache.copy()
+		obj._cp_map = self._cp_map.copy()
+		for k, v in obj._cp_map.iteritems():
+			obj._cp_map[k] = v[:]
+		obj._cpv_map = self._cpv_map.copy()
+		return obj
+
 	def __contains__(self, item):
 		existing = self._cpv_map.get(item.cpv)
 		if existing is not None and \

-- 
gentoo-commits@lists.gentoo.org mailing list



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

only message in thread, other threads:[~2008-04-27  0:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-27  0:26 [gentoo-commits] portage r9988 - main/branches/2.1.2/bin 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