public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r13061 - main/trunk/pym/_emerge
@ 2009-03-11 23:59 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-03-11 23:59 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2009-03-11 23:59:13 +0000 (Wed, 11 Mar 2009)
New Revision: 13061

Modified:
   main/trunk/pym/_emerge/__init__.py
Log:
Bug #262211 - Avoid triggering an InvalidAtom exception inside the Package
constructor when SLOT is empty.


Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py	2009-03-11 23:49:03 UTC (rev 13060)
+++ main/trunk/pym/_emerge/__init__.py	2009-03-11 23:59:13 UTC (rev 13061)
@@ -1568,7 +1568,12 @@
 		self.root = self.root_config.root
 		self.metadata = _PackageMetadataWrapper(self, self.metadata)
 		self.cp = portage.cpv_getkey(self.cpv)
-		self.slot_atom = portage.dep.Atom("%s:%s" % (self.cp, self.slot))
+		slot = self.slot
+		if not slot:
+			# Avoid an InvalidAtom exception when creating slot_atom.
+			# This package instance will be masked due to empty SLOT.
+			slot = '0'
+		self.slot_atom = portage.dep.Atom("%s:%s" % (self.cp, slot))
 		self.category, self.pf = portage.catsplit(self.cpv)
 		self.cpv_split = portage.catpkgsplit(self.cpv)
 		self.pv_split = self.cpv_split[1:]




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

only message in thread, other threads:[~2009-03-11 23:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-11 23:59 [gentoo-commits] portage r13061 - main/trunk/pym/_emerge 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