summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-03-13 12:33:56 +0100
committerDan McGee <dan@archlinux.org>2012-03-16 15:54:02 +0100
commitd521f30f071e2bd2c39c05f39df34be867dfe572 (patch)
tree3b34fc7c568c5979e58d0a108f537b00a2f73e0e /test
parent9e1a20022d8186eba0005e20b8b6db16cf7dec64 (diff)
downloadpacman-d521f30f071e2bd2c39c05f39df34be867dfe572.tar.gz
pacman-d521f30f071e2bd2c39c05f39df34be867dfe572.tar.xz
pactest: make OPTDEPEND rule look at non-description only
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'test')
-rw-r--r--test/pacman/pmrule.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/pacman/pmrule.py b/test/pacman/pmrule.py
index 107a4083..778b6aac 100644
--- a/test/pacman/pmrule.py
+++ b/test/pacman/pmrule.py
@@ -87,8 +87,11 @@ class pmrule(object):
if not value in newpkg.depends:
success = 0
elif case == "OPTDEPENDS":
- if not value in newpkg.optdepends:
- success = 0
+ success = 0
+ for optdep in newpkg.optdepends:
+ if value == optdep.split(':', 1)[0]:
+ success = 1
+ break
elif case == "REASON":
if newpkg.reason != int(value):
success = 0