summaryrefslogtreecommitdiffstats
path: root/bin/repoman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-12-09 20:34:45 +0000
committerZac Medico <zmedico@gentoo.org>2006-12-09 20:34:45 +0000
commit15e8f08e0ec79cb0f732c3b065d811eaa6019c42 (patch)
tree57d72b0ff40223aebfc020b379e168c7584a8369 /bin/repoman
parent5c71839c874d9ac5b1d5d6b4e67ac1708a7c4c54 (diff)
downloadportage-15e8f08e0ec79cb0f732c3b065d811eaa6019c42.tar.gz
portage-15e8f08e0ec79cb0f732c3b065d811eaa6019c42.tar.bz2
portage-15e8f08e0ec79cb0f732c3b065d811eaa6019c42.zip
Clean up depstring/atom splitting and filtering.
svn path=/main/trunk/; revision=5243
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/repoman b/bin/repoman
index 451bd21d0..2710f66ca 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1062,6 +1062,7 @@ for x in scanlist:
myflag = myflag[1:]
myiuse.add(myflag)
+ operator_tokens = set(["||", "(", ")"])
type_list, badsyntax = [], []
for mytype in ("DEPEND", "RDEPEND", "PDEPEND", "LICENSE", "PROVIDE"):
mydepstr = myaux[mytype]
@@ -1084,7 +1085,7 @@ for x in scanlist:
except portage_exception.InvalidDependString, e:
badsyntax.append(str(e))
- for token in ("||", "(", ")"):
+ for token in operator_tokens:
if mydepstr.startswith(token+" "):
myteststr = mydepstr[len(token):]
else:
@@ -1098,7 +1099,10 @@ for x in scanlist:
if mytype in ("DEPEND", "RDEPEND", "PDEPEND"):
- for token in filter(lambda x: not (x.endswith("?") or x.strip() in ("||", "&&", "(", ")")), mydepstr.split()):
+ for token in mydepstr.split():
+ if token in operator_tokens or \
+ token.endswith("?"):
+ continue
if not portage.isvalidatom(token) or \
":" in token and myaux["EAPI"] == "0":
badsyntax.append("'%s' not a valid atom" % token)