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

Author: zmedico
Date: 2009-06-25 06:24:33 +0000 (Thu, 25 Jun 2009)
New Revision: 13692

Modified:
   main/trunk/pym/_emerge/Package.py
   main/trunk/pym/_emerge/Scheduler.py
   main/trunk/pym/_emerge/depgraph.py
Log:
Add a Package.metadata.properties attribute containing a list of enabled
PROPERTIES values.


Modified: main/trunk/pym/_emerge/Package.py
===================================================================
--- main/trunk/pym/_emerge/Package.py	2009-06-25 06:06:14 UTC (rev 13691)
+++ main/trunk/pym/_emerge/Package.py	2009-06-25 06:24:33 UTC (rev 13692)
@@ -237,3 +237,7 @@
 			except ValueError:
 				v = 0
 		self._pkg.mtime = v
+
+	@property
+	def properties(self):
+		return self['PROPERTIES'].split()

Modified: main/trunk/pym/_emerge/Scheduler.py
===================================================================
--- main/trunk/pym/_emerge/Scheduler.py	2009-06-25 06:06:14 UTC (rev 13691)
+++ main/trunk/pym/_emerge/Scheduler.py	2009-06-25 06:24:33 UTC (rev 13692)
@@ -328,14 +328,7 @@
 			if not (isinstance(task, Package) and \
 				task.operation == "merge"):
 				continue
-			try:
-				properties = flatten(use_reduce(paren_reduce(
-					task.metadata["PROPERTIES"]), uselist=task.use.enabled))
-			except portage.exception.InvalidDependString, e:
-				show_invalid_depstring_notice(task,
-					task.metadata["PROPERTIES"], str(e))
-				raise self._unknown_internal_error()
-			if "interactive" in properties:
+			if 'interactive' in task.metadata.properties:
 				interactive_tasks.append(task)
 		return interactive_tasks
 

Modified: main/trunk/pym/_emerge/depgraph.py
===================================================================
--- main/trunk/pym/_emerge/depgraph.py	2009-06-25 06:06:14 UTC (rev 13691)
+++ main/trunk/pym/_emerge/depgraph.py	2009-06-25 06:24:33 UTC (rev 13692)
@@ -4007,18 +4007,8 @@
 						else:
 							return colorize("PKG_NOMERGE", pkg_str)
 
-				try:
-					properties = flatten(use_reduce(paren_reduce(
-						pkg.metadata["PROPERTIES"]), uselist=pkg.use.enabled))
-				except portage.exception.InvalidDependString, e:
-					if not pkg.installed:
-						show_invalid_depstring_notice(pkg,
-							pkg.metadata["PROPERTIES"], str(e))
-						del e
-						return 1
-					properties = []
-				interactive = "interactive" in properties
-				if interactive and pkg.operation == "merge":
+				if 'interactive' in pkg.metadata.properties and \
+					pkg.operation == 'merge':
 					addl = colorize("WARN", "I") + addl[1:]
 					if ordered:
 						counters.interactive += 1




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

only message in thread, other threads:[~2009-06-25  6:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-25  6:24 [gentoo-commits] portage r13692 - 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