summaryrefslogtreecommitdiff
path: root/src/apk_database.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-03-16 14:55:08 +0200
committerTimo Teräs <timo.teras@iki.fi>2011-03-16 14:56:13 +0200
commit415e230a7f0874206d4bbe2662c9f9cbf7e4c307 (patch)
tree173b2515647bac6fa27dba95575ca66a2511281a /src/apk_database.h
parent1e17da9d704097523e337b64d2b0e424caa4a9ef (diff)
downloadapk-tools-415e230a7f0874206d4bbe2662c9f9cbf7e4c307.tar.gz
apk-tools-415e230a7f0874206d4bbe2662c9f9cbf7e4c307.tar.bz2
apk-tools-415e230a7f0874206d4bbe2662c9f9cbf7e4c307.tar.xz
apk-tools-415e230a7f0874206d4bbe2662c9f9cbf7e4c307.zip
db, cache: automatically remount cache read-write when needed
.. and back to read-only after finishing with modifications. fixes #512
Diffstat (limited to 'src/apk_database.h')
-rw-r--r--src/apk_database.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/apk_database.h b/src/apk_database.h
index 64c4fed..988a668 100644
--- a/src/apk_database.h
+++ b/src/apk_database.h
@@ -105,9 +105,11 @@ struct apk_database {
int root_fd, lock_fd, cache_fd, cachetmp_fd, keys_fd;
unsigned name_id, num_repos;
const char *cache_dir;
+ char *cache_remount_dir;
apk_blob_t *arch;
unsigned int local_repos;
int permanent : 1;
+ int ro_cache : 1;
int compat_newfeatures : 1;
int compat_notinstallable : 1;
@@ -155,6 +157,7 @@ struct apk_db_file *apk_db_file_query(struct apk_database *db,
#define APK_OPENF_NO_WORLD 0x0040
#define APK_OPENF_NO_SYS_REPOS 0x0100
#define APK_OPENF_NO_INSTALLED_REPO 0x0200
+#define APK_OPENF_CACHE_WRITE 0x0400
#define APK_OPENF_NO_REPOS (APK_OPENF_NO_SYS_REPOS | \
APK_OPENF_NO_INSTALLED_REPO)