aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2005-02-28 22:52:32 +0000
committerJason Woodward2005-02-28 22:52:32 +0000
commit8cbda017ff9439b80e2f40988890ee4247c94463 (patch)
treeee4a139a9fd9cfd762a0df67afd02f9367bc484f
parent90a5073fa32fc7f777ec2709591539cb4e559237 (diff)
downloadslapt-get-8cbda017ff9439b80e2f40988890ee4247c94463.tar.gz
--list now properly shows installed packages
-rw-r--r--ChangeLog1
-rw-r--r--src/action.c23
2 files changed, 21 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 267cf5a..ac3ee6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
0.9.9i Feb 28, 2005
+ * --list now properly shows installed packages
* installed packages now parse out package location from /var/log/packages entry
* added add_source() (libslapt)
* add_deps_to_trans() returns early if passed pkg_info_t is NULL
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);