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
This commit is contained in:
parent
c63ee3cef4
commit
6649032a37
|
|
@ -4279,8 +4279,18 @@ import_one_object_direct (OstreeRepo *dest_repo,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
return FALSE;
|
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
|
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 */
|
/* bare-user; we just want ostree.usermeta */
|
||||||
g_autoptr(GBytes) bytes =
|
g_autoptr(GBytes) bytes =
|
||||||
glnx_fgetxattr_bytes (src_fd, "user.ostreemeta", error);
|
glnx_fgetxattr_bytes (src_fd, "user.ostreemeta", error);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue