From 0f544e97a936c6de5971fc58085a1c2dec173813 Mon Sep 17 00:00:00 2001 From: guinux Date: Sat, 1 Jun 2013 11:22:57 +0200 Subject: [PATCH] display if an optdep is installed --- pamac/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pamac/main.py b/pamac/main.py index 4c5acd2..1762bf9 100644 --- a/pamac/main.py +++ b/pamac/main.py @@ -235,7 +235,13 @@ def set_deps_list(pkg, style): if pkg.depends: deps_list.append([_('Depends On')+':', '\n'.join(pkg.depends)]) 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 pkg.compute_requiredby(): deps_list.append([_('Required By')+':', '\n'.join(pkg.compute_requiredby())])