diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-12-16 23:25:03 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-12-16 23:25:03 +0000 |
commit | 31e2c6934be25c49eda90f7271eee79fa42737a5 (patch) | |
tree | b1abad50b4cfacaf45b7a4dccb39a2109e9f3907 /pym/portage_dep.py | |
parent | 5d96649ac61ab51295b125b0dae33312fc009024 (diff) | |
download | portage-31e2c6934be25c49eda90f7271eee79fa42737a5.tar.gz portage-31e2c6934be25c49eda90f7271eee79fa42737a5.tar.bz2 portage-31e2c6934be25c49eda90f7271eee79fa42737a5.zip |
Make use_reduce raise an InvalidDependString exception for use? conditionals that aren't followed by parenthesis and add appropriate exception handling in dep_check.
svn path=/main/trunk/; revision=5305
Diffstat (limited to 'pym/portage_dep.py')
-rw-r--r-- | pym/portage_dep.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pym/portage_dep.py b/pym/portage_dep.py index 7a4d76aae..a482ab2f4 100644 --- a/pym/portage_dep.py +++ b/pym/portage_dep.py @@ -167,8 +167,9 @@ def use_reduce(deparray, uselist=[], masklist=[], matchall=0, excludeall=[]): for head in newdeparray[:-1]: head = head[:-1] if head[0] == "!": - head = head[1:] - if not matchall and head in uselist or head in excludeall: + head_key = head[1:] + if not matchall and head_key in uselist or \ + head_key in excludeall: ismatch = False break elif head not in masklist: @@ -186,7 +187,8 @@ def use_reduce(deparray, uselist=[], masklist=[], matchall=0, excludeall=[]): if additions: rlist.append(additions) else: - rlist += [target] + raise portage_exception.InvalidDependString( + "Conditional without parenthesis: '%s?'" % head) else: rlist += [head] |