summaryrefslogtreecommitdiff
path: root/src/fix.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2014-10-07 13:29:34 +0300
committerTimo Teräs <timo.teras@iki.fi>2014-10-07 14:11:29 +0300
commit09e48d8f06bfb924b80ce3e95c281524c4891828 (patch)
treeb3da94f56dc065577baa06e0f3d8cd43d2500bf8 /src/fix.c
parente0f9b0897be8e5524eaeef302249c90498d3218a (diff)
downloadapk-tools-09e48d8f06bfb924b80ce3e95c281524c4891828.tar.gz
apk-tools-09e48d8f06bfb924b80ce3e95c281524c4891828.tar.bz2
apk-tools-09e48d8f06bfb924b80ce3e95c281524c4891828.tar.xz
apk-tools-09e48d8f06bfb924b80ce3e95c281524c4891828.zip
db: rework directory permission handling
Apk used to reset directory permissions always, but this is undesirable if user has modified the permissions - especially during tmpfs boot. Though, it is desirable to update the permissions when packaging has changed permissions, or a new package is installed and the merged permission mask / owner changes. Thus the new code updates the permissions only if: 1) We are booting and directory is not in apkovl 2) The directory is modified by a package install/remove/upgrade 3) The filesystem directory permission matched database Additionally "apk fix --directory-permissions" can be used to reset all directory permissions to the database defaults. Fixes #2966
Diffstat (limited to 'src/fix.c')
-rw-r--r--src/fix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fix.c b/src/fix.c
index 3a7a8e6..df85c2c 100644
--- a/src/fix.c
+++ b/src/fix.c
@@ -48,7 +48,7 @@ static int fix_parse(void *pctx, struct apk_db_options *dbopts,
static int mark_recalculate(apk_hash_item item, void *ctx)
{
struct apk_db_dir *dir = (struct apk_db_dir *) item;
- dir->recalc_mode = 1;
+ dir->update_permissions = 1;
return 0;
}