public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [gentoo-commits] portage r10521 - main/trunk/pym/_emerge
@ 2008-05-31 20:03 99% Zac Medico (zmedico)
  0 siblings, 0 replies; 1+ results
From: Zac Medico (zmedico) @ 2008-05-31 20:03 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-05-31 20:02:58 +0000 (Sat, 31 May 2008)
New Revision: 10521

Modified:
   main/trunk/pym/_emerge/__init__.py
Log:
Fix create_world_atom() to take a Package instance in it's arguments.


Modified: main/trunk/pym/_emerge/__init__.py
===================================================================
--- main/trunk/pym/_emerge/__init__.py	2008-05-31 09:37:28 UTC (rev 10520)
+++ main/trunk/pym/_emerge/__init__.py	2008-05-31 20:02:58 UTC (rev 10521)
@@ -736,15 +736,14 @@
 		self.sets = self.setconfig.getSets()
 		self.visible_pkgs = PackageVirtualDbapi(self.settings)
 
-def create_world_atom(pkg_key, metadata, args_set, root_config):
+def create_world_atom(pkg, args_set, root_config):
 	"""Create a new atom for the world file if one does not exist.  If the
 	argument atom is precise enough to identify a specific slot then a slot
 	atom will be returned. Atoms that are in the system set may also be stored
 	in world since system atoms can only match one slot while world atoms can
 	be greedy with respect to slots.  Unslotted system packages will not be
 	stored in world."""
-	pkg = Package(cpv=pkg_key, root_config=root_config, metadata=metadata)
-	metadata = pkg.metadata
+
 	arg_atom = args_set.findAtomForPackage(pkg)
 	if not arg_atom:
 		return None
@@ -766,7 +765,7 @@
 	if slotted and arg_atom != cp:
 		# If the user gave a specific atom, store it as a
 		# slot atom in the world file.
-		slot_atom = "%s:%s" % (cp, metadata["SLOT"])
+		slot_atom = pkg.slot_atom
 
 		# For USE=multislot, there are a couple of cases to
 		# handle here:
@@ -4928,8 +4927,7 @@
 						myroot == self.target_root and \
 						favorites_set.findAtomForPackage(pkg):
 						# Maybe it will be added to world now.
-						if create_world_atom(pkg_key, metadata,
-							favorites_set, root_config):
+						if create_world_atom(pkg, favorites_set, root_config):
 							pkg_world = True
 				except portage.exception.InvalidDependString:
 					# This is reported elsewhere if relevant.
@@ -5228,10 +5226,9 @@
 			pkg_type, root, pkg_key, pkg_status = x
 			if pkg_status != "nomerge":
 				continue
-			metadata = x.metadata
+
 			try:
-				myfavkey = create_world_atom(pkg_key, metadata,
-					args_set, root_config)
+				myfavkey = create_world_atom(pkg, args_set, root_config)
 				if myfavkey:
 					if myfavkey in added_favorites:
 						continue
@@ -6178,8 +6175,7 @@
 					args_set.findAtomForPackage(pkg):
 					world_set.lock()
 					world_set.load() # maybe it's changed on disk
-					myfavkey = create_world_atom(pkg_key, metadata,
-						args_set, root_config)
+					myfavkey = create_world_atom(pkg, args_set, root_config)
 					if myfavkey:
 						print ">>> Recording",myfavkey,"in \"world\" favorites file..."
 						emergelog(xterm_titles, " === ("+\

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



^ permalink raw reply	[relevance 99%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2008-05-31 20:03 99% [gentoo-commits] portage r10521 - 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