summaryrefslogtreecommitdiff
path: root/src/apk_database.h
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-01-06 19:44:54 +0200
committerTimo Teras <timo.teras@iki.fi>2009-01-06 21:23:26 +0200
commit6b2b9d303e61599d566a70b6e3100b9afe400d4b (patch)
tree764692ed7c35e6287f703a5a66f672e159d96be7 /src/apk_database.h
parent354b6e4631be03ef914fec2a0dee7ef223adf9bc (diff)
downloadapk-tools-6b2b9d303e61599d566a70b6e3100b9afe400d4b.tar.gz
apk-tools-6b2b9d303e61599d566a70b6e3100b9afe400d4b.tar.bz2
apk-tools-6b2b9d303e61599d566a70b6e3100b9afe400d4b.tar.xz
apk-tools-6b2b9d303e61599d566a70b6e3100b9afe400d4b.zip
db: restructure in-memory organization
Diffstat (limited to 'src/apk_database.h')
-rw-r--r--src/apk_database.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/apk_database.h b/src/apk_database.h
index ff8eac5..8db9e85 100644
--- a/src/apk_database.h
+++ b/src/apk_database.h
@@ -21,10 +21,9 @@
struct apk_db_file {
struct hlist_node dir_files_list;
- struct hlist_node pkg_files_list;
+ struct hlist_node diri_files_list;
- struct apk_db_dir *dir;
- struct apk_package *owner;
+ struct apk_db_dir_instance *diri;
csum_t csum;
char filename[];
};
@@ -37,12 +36,19 @@ struct apk_db_dir {
struct hlist_head files;
struct apk_db_dir *parent;
- unsigned refs;
+ unsigned short refs;
+ unsigned short flags;
+ char dirname[];
+};
+
+struct apk_db_dir_instance {
+ struct hlist_node pkg_dirs_list;
+ struct hlist_head owned_files;
+ struct apk_package *pkg;
+ struct apk_db_dir *dir;
mode_t mode;
uid_t uid;
gid_t gid;
- unsigned flags;
- char dirname[];
};
struct apk_name {