diff options
Diffstat (limited to 'src/app_info.c')
-rw-r--r-- | src/app_info.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/app_info.c b/src/app_info.c index fb597d8..b7174ac 100644 --- a/src/app_info.c +++ b/src/app_info.c @@ -442,7 +442,6 @@ static int info_main(void *ctx, struct apk_ctx *ac, struct apk_string_array *arg struct apk_out *out = &ac->out; struct apk_database *db = ac->db; struct info_ctx *ictx = (struct info_ctx *) ctx; - struct apk_installed_package *ipkg; verbosity = apk_out_verbosity(out); ictx->db = db; @@ -455,8 +454,10 @@ static int info_main(void *ctx, struct apk_ctx *ac, struct apk_string_array *arg apk_db_foreach_sorted_providers(db, args, print_name_info, ctx); } else { /* Print all installed packages */ - list_for_each_entry(ipkg, &db->installed.packages, installed_pkgs_list) - verbose_print_pkg(ipkg->pkg, 1); + struct apk_package_array *pkgs = apk_db_sorted_installed_packages(db); + struct apk_package **ppkg; + foreach_array_item(ppkg, pkgs) + verbose_print_pkg(*ppkg, 1); } return ictx->errors; |