summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-03-13 06:33:56 -0500
committerDan McGee <dan@archlinux.org>2012-03-16 09:54:02 -0500
commitd521f30f071e2bd2c39c05f39df34be867dfe572 (patch)
tree3b34fc7c568c5979e58d0a108f537b00a2f73e0e
parent9e1a20022d8186eba0005e20b8b6db16cf7dec64 (diff)
downloadpacman-d521f30f071e2bd2c39c05f39df34be867dfe572.tar.xz
pactest: make OPTDEPEND rule look at non-description only
Signed-off-by: Dan McGee <dan@archlinux.org>
-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