diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-05-30 00:13:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-05-30 00:13:34 +0000 |
commit | c32bbd2e8b207b4a35af70983b170081feabc8df (patch) | |
tree | facc742631bf337cd8ac18d3d123f49475c82432 /bin | |
parent | 96c6b245c2b6e3e18376d89b4db7a16a4020ccc3 (diff) | |
download | portage-c32bbd2e8b207b4a35af70983b170081feabc8df.tar.gz portage-c32bbd2e8b207b4a35af70983b170081feabc8df.tar.bz2 portage-c32bbd2e8b207b4a35af70983b170081feabc8df.zip |
Create Atom instances earlier to avoid redundant validation. (trunk r10495)
svn path=/main/branches/2.1.2/; revision=10496
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/repoman | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/repoman b/bin/repoman index 9f48a1536..4749523dd 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1702,14 +1702,15 @@ for x in scanlist: if token in operator_tokens or \ token.endswith("?"): continue - if not portage.isvalidatom(token, allow_blockers=True): + try: + atom = portage_dep.Atom(token) + except portage_exception.InvalidAtom: badsyntax.append("'%s' not a valid atom" % token) else: - atom = token - is_blocker = atom.startswith("!") - if is_blocker: - atom = token.lstrip("!") - atom = portage_dep.Atom(atom) + is_blocker = atom.blocker + if atom.blocker: + atom = portage_dep.Atom(atom[1:]) + if mytype == "DEPEND" and \ not is_blocker and \ not inherited_java_eclass and \ |