summaryrefslogtreecommitdiff
path: root/src/apk_database.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2023-03-06 22:00:45 +0200
committerTimo Teräs <timo.teras@iki.fi>2023-04-11 20:55:13 +0300
commit8feb2cae4da3ad7aad9b8dea5f19c20c296bc786 (patch)
tree05e7dd39c70fb9311713824d09894232d85deed3 /src/apk_database.h
parent84e0e00805aca0530a8891975a8a04390df8945c (diff)
downloadapk-tools-8feb2cae4da3ad7aad9b8dea5f19c20c296bc786.tar.gz
apk-tools-8feb2cae4da3ad7aad9b8dea5f19c20c296bc786.tar.bz2
apk-tools-8feb2cae4da3ad7aad9b8dea5f19c20c296bc786.tar.xz
apk-tools-8feb2cae4da3ad7aad9b8dea5f19c20c296bc786.zip
db, info: sort installed package based data by package name
Diffstat (limited to 'src/apk_database.h')
-rw-r--r--src/apk_database.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/apk_database.h b/src/apk_database.h
index 649cfc0..5818eb4 100644
--- a/src/apk_database.h
+++ b/src/apk_database.h
@@ -164,6 +164,7 @@ struct apk_database {
int compat_newfeatures : 1;
int compat_notinstallable : 1;
int sorted_names : 1;
+ int sorted_installed_packages : 1;
struct apk_dependency_array *world;
struct apk_protected_path_array *protected_paths;
@@ -183,6 +184,7 @@ struct apk_database {
} available;
struct {
+ struct apk_package_array *sorted_packages;
struct list_head packages;
struct list_head triggers;
struct apk_hash dirs;
@@ -277,6 +279,9 @@ int apk_db_install_pkg(struct apk_database *db,
struct apk_package *newpkg,
apk_progress_cb cb, void *cb_ctx);
+
+struct apk_package_array *apk_db_sorted_installed_packages(struct apk_database *db);
+
typedef int (*apk_db_foreach_name_cb)(struct apk_database *db, const char *match, struct apk_name *name, void *ctx);
int apk_db_foreach_matching_name(struct apk_database *db, struct apk_string_array *filter,