display if an optdep is installed

This commit is contained in:
guinux 2013-06-01 11:22:57 +02:00
parent 03beafc4b2
commit 0f544e97a9

View File

@ -235,7 +235,13 @@ def set_deps_list(pkg, style):
if pkg.depends: if pkg.depends:
deps_list.append([_('Depends On')+':', '\n'.join(pkg.depends)]) deps_list.append([_('Depends On')+':', '\n'.join(pkg.depends)])
if pkg.optdepends: if pkg.optdepends:
deps_list.append([_('Optional Deps')+':', '\n'.join(pkg.optdepends)]) optdeps = []
for optdep in pkg.optdepends:
if optdep.split(':')[0] in transaction.localpkgs.keys():
optdeps.append(optdep+' ['+_('Installed')+']')
else:
optdeps.append(optdep)
deps_list.append([_('Optional Deps')+':', '\n'.join(optdeps)])
if style == 'local': if style == 'local':
if pkg.compute_requiredby(): if pkg.compute_requiredby():
deps_list.append([_('Required By')+':', '\n'.join(pkg.compute_requiredby())]) deps_list.append([_('Required By')+':', '\n'.join(pkg.compute_requiredby())])