lib/commit: Honor commit filter for libarchive --tar-autocreate-parents

This makes `ostree commit --tree=tar` honor `--owner-uid` and `--owner-gid`
for the root directory.

Prep for further commit filtering work, although mostly for the unit test cases;
this ensures we can use `ostree checkout` after autocreating a root directory.

Closes: #1104
Approved by: jlebon
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2017-08-23 14:48:12 +00:00
1 parent 556e2deb93
commit eb6f7c6db8
2 files changed
+16 -2

No files matched your search

+5 -1
View File
@@ -861,7 +861,11 @@ ostree_repo_import_archive_to_mtree (OstreeRepo *self,
g_file_info_set_attribute_uint32 (fi, "unix::gid", 0);
g_file_info_set_attribute_uint32 (fi, "unix::mode", DEFAULT_DIRMODE);
if (!aic_ensure_parent_dir_with_file_info (&aictx, mtree, "/", fi, NULL,
g_autoptr(GFileInfo) mfi = NULL;
(void)_ostree_repo_commit_modifier_apply (self, modifier, "/",
fi, &mfi);
if (!aic_ensure_parent_dir_with_file_info (&aictx, mtree, "/", mfi, NULL,
cancellable, error))
goto out;
}