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

Author: zmedico
Date: 2009-06-26 23:01:46 +0000 (Fri, 26 Jun 2009)
New Revision: 13702

Modified:
   main/trunk/bin/repoman
   main/trunk/pym/_emerge/Package.py
Log:
Fix PROVIDE code since the Package class automatically evaluates USE
conditionals now.


Modified: main/trunk/bin/repoman
===================================================================
--- main/trunk/bin/repoman	2009-06-26 22:43:39 UTC (rev 13701)
+++ main/trunk/bin/repoman	2009-06-26 23:01:46 UTC (rev 13702)
@@ -1237,14 +1237,15 @@
 		#	if x.startswith("no"):
 		#		print "Bad RESTRICT value: %s" % x
 		try:
-			myaux["PROVIDE"] = portage.dep.use_reduce(
+			portage.dep.use_reduce(
 				portage.dep.paren_reduce(myaux["PROVIDE"]), matchall=1)
 		except portage.exception.InvalidDependString, e:
 			stats["PROVIDE.syntax"] = stats["PROVIDE.syntax"] + 1
 			fails["PROVIDE.syntax"].append(mykey+".ebuild PROVIDE: "+str(e))
 			del e
 			continue
-		myaux["PROVIDE"] = " ".join(portage.flatten(myaux["PROVIDE"]))
+
+		# The Package class automatically evaluates USE conditionals.
 		for myprovide in myaux["PROVIDE"].split():
 			prov_cp = portage.dep_getkey(myprovide)
 			if prov_cp != myprovide:

Modified: main/trunk/pym/_emerge/Package.py
===================================================================
--- main/trunk/pym/_emerge/Package.py	2009-06-26 22:43:39 UTC (rev 13701)
+++ main/trunk/pym/_emerge/Package.py	2009-06-26 23:01:46 UTC (rev 13702)
@@ -185,8 +185,12 @@
 		if k in self._use_conditional_keys:
 			if '?' in v:
 				try:
-					v = paren_enclose(paren_normalize(use_reduce(
-						paren_reduce(v), uselist=self._pkg.use.enabled)))
+					if self._pkg.root_config.settings.local_config:
+						v = paren_enclose(paren_normalize(use_reduce(
+							paren_reduce(v), uselist=self._pkg.use.enabled)))
+					else:
+						v = paren_enclose(paren_normalize(use_reduce(
+							paren_reduce(v), matchall=1)))
 				except portage.exception.InvalidDependString:
 					# This error should already have been registered via
 					# self._pkg._invalid_metadata().




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

only message in thread, other threads:[~2009-06-26 23:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-26 23:01 [gentoo-commits] portage r13702 - in main/trunk: bin 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