lib/core: introduce 'bare-split-xattrs' mode
This commit is contained in:
8 files changed
+82
-11
No files matched your search
@@ -197,7 +197,8 @@ _ostree_repo_mode_is_bare (OstreeRepoMode mode)
|
||||
return
|
||||
mode == OSTREE_REPO_MODE_BARE ||
|
||||
mode == OSTREE_REPO_MODE_BARE_USER ||
|
||||
mode == OSTREE_REPO_MODE_BARE_USER_ONLY;
|
||||
mode == OSTREE_REPO_MODE_BARE_USER_ONLY ||
|
||||
mode == OSTREE_REPO_MODE_BARE_SPLIT_XATTRS;
|
||||
}
|
||||
|
||||
#ifndef OSTREE_DISABLE_GPGME
|
||||
|
||||
@@ -39,6 +39,7 @@ G_STATIC_ASSERT(OSTREE_REPO_MODE_ARCHIVE_Z2 == 1);
|
||||
G_STATIC_ASSERT(OSTREE_REPO_MODE_ARCHIVE == OSTREE_REPO_MODE_ARCHIVE_Z2);
|
||||
G_STATIC_ASSERT(OSTREE_REPO_MODE_BARE_USER == 2);
|
||||
G_STATIC_ASSERT(OSTREE_REPO_MODE_BARE_USER_ONLY == 3);
|
||||
G_STATIC_ASSERT(OSTREE_REPO_MODE_BARE_SPLIT_XATTRS == 4);
|
||||
|
||||
static GBytes *variant_to_lenprefixed_buffer (GVariant *variant);
|
||||
|
||||
|
||||
@@ -193,6 +193,7 @@ typedef enum {
|
||||
* @OSTREE_REPO_MODE_ARCHIVE_Z2: Legacy alias for `OSTREE_REPO_MODE_ARCHIVE`
|
||||
* @OSTREE_REPO_MODE_BARE_USER: Files are stored as themselves, except ownership; can be written by user. Hardlinks work only in user checkouts.
|
||||
* @OSTREE_REPO_MODE_BARE_USER_ONLY: Same as BARE_USER, but all metadata is not stored, so it can only be used for user checkouts. Does not need xattrs.
|
||||
* @OSTREE_REPO_MODE_BARE_SPLIT_XATTRS: Same as BARE_USER, but xattrs are stored separately from file content, with dedicated object types.
|
||||
*
|
||||
* See the documentation of #OstreeRepo for more information about the
|
||||
* possible modes.
|
||||
@@ -203,6 +204,7 @@ typedef enum {
|
||||
OSTREE_REPO_MODE_ARCHIVE_Z2 = OSTREE_REPO_MODE_ARCHIVE,
|
||||
OSTREE_REPO_MODE_BARE_USER,
|
||||
OSTREE_REPO_MODE_BARE_USER_ONLY,
|
||||
OSTREE_REPO_MODE_BARE_SPLIT_XATTRS,
|
||||
} OstreeRepoMode;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2704,6 +2704,9 @@ ostree_repo_mode_to_string (OstreeRepoMode mode,
|
||||
/* Legacy alias */
|
||||
ret_mode ="archive-z2";
|
||||
break;
|
||||
case OSTREE_REPO_MODE_BARE_SPLIT_XATTRS:
|
||||
ret_mode = "bare-split-xattrs";
|
||||
break;
|
||||
default:
|
||||
return glnx_throw (error, "Invalid mode '%d'", mode);
|
||||
}
|
||||
@@ -2734,6 +2737,8 @@ ostree_repo_mode_from_string (const char *mode,
|
||||
else if (strcmp (mode, "archive-z2") == 0 ||
|
||||
strcmp (mode, "archive") == 0)
|
||||
ret_mode = OSTREE_REPO_MODE_ARCHIVE;
|
||||
else if (strcmp (mode, "bare-split-xattrs") == 0)
|
||||
ret_mode = OSTREE_REPO_MODE_BARE_SPLIT_XATTRS;
|
||||
else
|
||||
return glnx_throw (error, "Invalid mode '%s' in repository configuration", mode);
|
||||
|
||||
|
||||
Reference in new issue
Block a user