summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-repo-commit.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2019-01-16 13:45:34 +0000
committerAtomic Bot <atomic-devel@projectatomic.io>2019-01-16 14:37:15 +0000
commit6649032a375238255052a43adb8bc56faac989ca (patch)
treec4be8b74a5c3b25a71b8754ebce3eb10769f8b79 /src/libostree/ostree-repo-commit.c
parentc63ee3cef4fc77f995999035bcc57833653a94b0 (diff)
downloadostree-6649032a375238255052a43adb8bc56faac989ca.tar.gz
lib/commit: Don't set user.ostreemeta for bare → bare-user-only imports
The point of `bare-user-only` is it doesn't have xattrs; it's a special case in import handling. Closes: #1803 Approved by: jlebon
Diffstat (limited to 'src/libostree/ostree-repo-commit.c')
-rw-r--r--src/libostree/ostree-repo-commit.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c
index dfdd4853..f44446ca 100644
--- a/src/libostree/ostree-repo-commit.c
+++ b/src/libostree/ostree-repo-commit.c
@@ -4279,8 +4279,18 @@ import_one_object_direct (OstreeRepo *dest_repo,
cancellable, error))
return FALSE;
}
+ else if (dest_repo->mode == OSTREE_REPO_MODE_BARE_USER_ONLY)
+ {
+ /* Nothing; this is the "bareuser-only conversion case",
+ * we don't need to set any xattrs in the dest repo.
+ */
+ }
else
{
+ /* And this case must be bare-user → bare-user */
+ g_assert (src_repo->mode == OSTREE_REPO_MODE_BARE_USER);
+ g_assert (src_repo->mode == dest_repo->mode);
+
/* bare-user; we just want ostree.usermeta */
g_autoptr(GBytes) bytes =
glnx_fgetxattr_bytes (src_fd, "user.ostreemeta", error);