From 09e48d8f06bfb924b80ce3e95c281524c4891828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Tue, 7 Oct 2014 13:29:34 +0300 Subject: 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 --- src/commit.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/commit.c') diff --git a/src/commit.c b/src/commit.c index bf3b4a201d..5b47d9e544 100644 --- a/src/commit.c +++ b/src/commit.c @@ -302,6 +302,7 @@ int apk_solver_commit_changeset(struct apk_database *db, apk_print_progress(prog.total.bytes + prog.total.packages, prog.total.bytes + prog.total.packages); + apk_db_update_directory_permissions(db); run_triggers(db, changeset); all_done: -- cgit v1.2.3