Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Zac Medico (zmedico)" <zmedico@g.o>
Subject: portage r10394 - main/trunk/pym/portage
Date: Sat, 24 May 2008 22:03:28 +0000
Author: zmedico
Date: 2008-05-24 22:03:27 +0000 (Sat, 24 May 2008)
New Revision: 10394

Modified:
   main/trunk/pym/portage/__init__.py
Log:
For dep_expand() backward compatibility, handle atoms with missing '='
prefix which did not raise an error here before the portage.dep.Atom
class was introduced.


Modified: main/trunk/pym/portage/__init__.py
===================================================================
--- main/trunk/pym/portage/__init__.py	2008-05-24 21:33:12 UTC (rev 10393)
+++ main/trunk/pym/portage/__init__.py	2008-05-24 22:03:27 UTC (rev 10394)
@@ -5720,8 +5720,15 @@
 	myindex = orig_dep.index(mydep)
 	prefix = orig_dep[:myindex]
 	postfix = orig_dep[myindex+len(mydep):]
-	return portage.dep.Atom(prefix + cpv_expand(
-		mydep, mydb=mydb, use_cache=use_cache, settings=settings) + postfix)
+	expanded = cpv_expand(mydep, mydb=mydb,
+		use_cache=use_cache, settings=settings)
+	try:
+		return portage.dep.Atom(prefix + expanded + postfix)
+	except portage.exception.InvalidAtom:
+		# Missing '=' prefix is allowed for backward compatibility.
+		if not isvalidatom("=" + prefix + expanded + postfix):
+			raise
+		return portage.dep.Atom("=" + prefix + expanded + postfix)
 
 def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None,
 	use_cache=1, use_binaries=0, myroot="/", trees=None):

-- 
gentoo-commits@g.o mailing list


Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in dev-python/sip: ChangeLog sip-4.7.6.ebuild
Next by thread:
gentoo-x86 commit in dev-python/PyQt4: ChangeLog PyQt4-4.4.2.ebuild
Previous by date:
gentoo-x86 commit in dev-python/sip: ChangeLog sip-4.7.6.ebuild
Next by date:
gentoo-x86 commit in profiles: ChangeLog use.local.desc


Updated Sep 21, 2011

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.