1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 07:48:50 -05:00

pactest: make OPTDEPEND rule look at non-description only

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2012-03-13 06:33:56 -05:00
parent 9e1a20022d
commit d521f30f07

View File

@ -87,8 +87,11 @@ class pmrule(object):
if not value in newpkg.depends: if not value in newpkg.depends:
success = 0 success = 0
elif case == "OPTDEPENDS": 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": elif case == "REASON":
if newpkg.reason != int(value): if newpkg.reason != int(value):
success = 0 success = 0