Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r10394 - main/trunk/pym/portage
Date: Sat, 24 May 2008 22:03:29
Message-Id: E1K01po-000155-OS@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-05-24 22:03:27 +0000 (Sat, 24 May 2008)
3 New Revision: 10394
4
5 Modified:
6 main/trunk/pym/portage/__init__.py
7 Log:
8 For dep_expand() backward compatibility, handle atoms with missing '='
9 prefix which did not raise an error here before the portage.dep.Atom
10 class was introduced.
11
12
13 Modified: main/trunk/pym/portage/__init__.py
14 ===================================================================
15 --- main/trunk/pym/portage/__init__.py 2008-05-24 21:33:12 UTC (rev 10393)
16 +++ main/trunk/pym/portage/__init__.py 2008-05-24 22:03:27 UTC (rev 10394)
17 @@ -5720,8 +5720,15 @@
18 myindex = orig_dep.index(mydep)
19 prefix = orig_dep[:myindex]
20 postfix = orig_dep[myindex+len(mydep):]
21 - return portage.dep.Atom(prefix + cpv_expand(
22 - mydep, mydb=mydb, use_cache=use_cache, settings=settings) + postfix)
23 + expanded = cpv_expand(mydep, mydb=mydb,
24 + use_cache=use_cache, settings=settings)
25 + try:
26 + return portage.dep.Atom(prefix + expanded + postfix)
27 + except portage.exception.InvalidAtom:
28 + # Missing '=' prefix is allowed for backward compatibility.
29 + if not isvalidatom("=" + prefix + expanded + postfix):
30 + raise
31 + return portage.dep.Atom("=" + prefix + expanded + postfix)
32
33 def dep_check(depstring, mydbapi, mysettings, use="yes", mode=None, myuse=None,
34 use_cache=1, use_binaries=0, myroot="/", trees=None):
35
36 --
37 gentoo-commits@l.g.o mailing list