Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r10495 - main/trunk/bin
Date: Fri, 30 May 2008 00:03:52
Message-Id: E1K1s5y-0005WC-Sq@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-05-30 00:03:45 +0000 (Fri, 30 May 2008)
3 New Revision: 10495
4
5 Modified:
6 main/trunk/bin/repoman
7 Log:
8 Create Atom instances earlier to avoid redundant validation.
9
10
11 Modified: main/trunk/bin/repoman
12 ===================================================================
13 --- main/trunk/bin/repoman 2008-05-29 23:41:57 UTC (rev 10494)
14 +++ main/trunk/bin/repoman 2008-05-30 00:03:45 UTC (rev 10495)
15 @@ -1251,14 +1251,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