diff options
Diffstat (limited to 'test/pacman/pmrule.py')
-rw-r--r-- | test/pacman/pmrule.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/pacman/pmrule.py b/test/pacman/pmrule.py index 70c8838e..778b6aac 100644 --- a/test/pacman/pmrule.py +++ b/test/pacman/pmrule.py @@ -1,4 +1,4 @@ -#! /usr/bin/python +#! /usr/bin/python2 # # Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # @@ -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 |