summaryrefslogtreecommitdiff
path: root/src/apk_database.h
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2008-11-14 14:26:59 +0200
committerTimo Teras <timo.teras@iki.fi>2008-11-14 14:26:59 +0200
commit8e23a2ba4eb7f6192c6bce8a6da81004803eca3f (patch)
tree1450b08f0e2818a4bc12206081b6777b3e92b7f8 /src/apk_database.h
parent86676ac8c40a96880f323c2b1a09a5714d85705e (diff)
downloadapk-tools-8e23a2ba4eb7f6192c6bce8a6da81004803eca3f.tar.gz
apk-tools-8e23a2ba4eb7f6192c6bce8a6da81004803eca3f.tar.bz2
apk-tools-8e23a2ba4eb7f6192c6bce8a6da81004803eca3f.tar.xz
apk-tools-8e23a2ba4eb7f6192c6bce8a6da81004803eca3f.zip
db: checksum installed files, protect config files
Checksum of installed is computed on the fly when extracting them and it'll be saved to fdb. When installing config files those are diverted with suffix .apk-new if earlier version of same file with local changes exist.
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 d687bce..5cf2928 100644
--- a/src/apk_database.h
+++ b/src/apk_database.h
@@ -25,9 +25,12 @@ struct apk_db_file {
struct apk_db_dir *dir;
struct apk_package *owner;
+ csum_t csum;
char filename[];
};
+#define APK_DBDIRF_PROTECTED 0x0001
+
struct apk_db_dir {
apk_hash_node hash_node;
@@ -38,6 +41,7 @@ struct apk_db_dir {
mode_t mode;
uid_t uid;
gid_t gid;
+ unsigned flags;
char dirname[];
};
@@ -58,6 +62,7 @@ struct apk_database {
unsigned pkg_id, num_repos;
struct apk_dependency_array *world;
+ struct apk_string_array *protected_paths;
struct apk_repository repos[APK_MAX_REPOS];
struct {