diff options
author | Luca BRUNO <luca.bruno@coreos.com> | 2021-08-23 13:08:53 +0000 |
---|---|---|
committer | Luca BRUNO <luca.bruno@coreos.com> | 2021-08-24 07:56:19 +0000 |
commit | f75552e15ca1afb3ed05b3d16abfcb1e9de3c57d (patch) | |
tree | b975e6810e0f37d8fe6bbc2aeb0e816b85e4df94 /src | |
parent | 0276f4dc0c02170b763a796f5811adc2e7dd80ed (diff) | |
download | ostree-f75552e15ca1afb3ed05b3d16abfcb1e9de3c57d.tar.gz |
builtins/commit: set up relevant flags in bare-user-only mode
This detects bare-user-only mode and automatically enables a
commit modifier with relevant flags.
Diffstat (limited to 'src')
-rw-r--r-- | src/ostree/ot-builtin-commit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ostree/ot-builtin-commit.c b/src/ostree/ot-builtin-commit.c index 3698a2f4..370e085c 100644 --- a/src/ostree/ot-builtin-commit.c +++ b/src/ostree/ot-builtin-commit.c @@ -572,7 +572,9 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio goto out; } - if (opt_no_xattrs) + if (opt_canonical_permissions || repo->mode == OSTREE_REPO_MODE_BARE_USER_ONLY) + flags |= OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS; + if (opt_no_xattrs || repo->mode == OSTREE_REPO_MODE_BARE_USER_ONLY) flags |= OSTREE_REPO_COMMIT_MODIFIER_FLAGS_SKIP_XATTRS; if (opt_consume) flags |= OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CONSUME; @@ -581,8 +583,6 @@ ostree_builtin_commit (int argc, char **argv, OstreeCommandInvocation *invocatio opt_link_checkout_speedup = TRUE; /* Imply this */ flags |= OSTREE_REPO_COMMIT_MODIFIER_FLAGS_DEVINO_CANONICAL; } - if (opt_canonical_permissions) - flags |= OSTREE_REPO_COMMIT_MODIFIER_FLAGS_CANONICAL_PERMISSIONS; if (opt_generate_sizes) flags |= OSTREE_REPO_COMMIT_MODIFIER_FLAGS_GENERATE_SIZES; if (opt_disable_fsync) |