Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r10496 - main/branches/2.1.2/bin
Date: Fri, 30 May 2008 00:13:40
Message-Id: E1K1sFT-0001DN-3S@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-05-30 00:13:34 +0000 (Fri, 30 May 2008)
3 New Revision: 10496
4
5 Modified:
6 main/branches/2.1.2/bin/repoman
7 Log:
8 Create Atom instances earlier to avoid redundant validation. (trunk r10495)
9
10
11 Modified: main/branches/2.1.2/bin/repoman
12 ===================================================================
13 --- main/branches/2.1.2/bin/repoman 2008-05-30 00:03:45 UTC (rev 10495)
14 +++ main/branches/2.1.2/bin/repoman 2008-05-30 00:13:34 UTC (rev 10496)
15 @@ -1702,14 +1702,15 @@
16 if token in operator_tokens or \
17 token.endswith("?"):
18 continue
19 - if not portage.isvalidatom(token, allow_blockers=True):
20 + try:
21 + atom = portage_dep.Atom(token)
22 + except portage_exception.InvalidAtom:
23 badsyntax.append("'%s' not a valid atom" % token)
24 else:
25 - atom = token
26 - is_blocker = atom.startswith("!")
27 - if is_blocker:
28 - atom = token.lstrip("!")
29 - atom = portage_dep.Atom(atom)
30 + is_blocker = atom.blocker
31 + if atom.blocker:
32 + atom = portage_dep.Atom(atom[1:])
33 +
34 if mytype == "DEPEND" and \
35 not is_blocker and \
36 not inherited_java_eclass and \
37
38 --
39 gentoo-commits@l.g.o mailing list