summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-02-28 22:52:32 +0000
committerJason Woodward2005-02-28 22:52:32 +0000
commit8cbda017ff9439b80e2f40988890ee4247c94463 (patch)
treeee4a139a9fd9cfd762a0df67afd02f9367bc484f /src
parent90a5073fa32fc7f777ec2709591539cb4e559237 (diff)
downloadslapt-get-8cbda017ff9439b80e2f40988890ee4247c94463.tar.gz
--list now properly shows installed packages
Diffstat (limited to 'src')
-rw-r--r--src/action.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/action.c b/src/action.c
index 830674a..f580df1 100644
--- a/src/action.c
+++ b/src/action.c
@@ -166,13 +166,30 @@ void pkg_action_list(void){
bool_installed == 1
? _("yes")
: _("no"),
- short_description == NULL
- ? ""
- : short_description
+ (short_description == NULL) ? "" : short_description
);
free(short_description);
}
}
+ for(i = 0; i < installed_pkgs->pkg_count;++i){
+ char *short_description = NULL;
+ if( get_exact_pkg(pkgs,
+ installed_pkgs->pkgs[i]->name,
+ installed_pkgs->pkgs[i]->version
+ ) != NULL
+ ) continue;
+
+ short_description = gen_short_pkg_description(installed_pkgs->pkgs[i]);
+
+ printf("%s %s [inst=%s]: %s\n",
+ installed_pkgs->pkgs[i]->name,
+ installed_pkgs->pkgs[i]->version,
+ _("yes"),
+ (short_description == NULL) ? "" : short_description
+ );
+ free(short_description);
+
+ }
free_pkg_list(pkgs);
free_pkg_list(installed_pkgs);