repo-pull: Allow pulling only one directory
Changes the pull API to allow pulling only a single directory instead of the whole deployment. This option is utilized by the check-diff option in rpm-ostree. Add a new state directory to hold <checksum>.commitpartial files, so we know that we've only downloaded partial state.
This commit is contained in:
1 parent
6a55d2c32f
commit
3742c32945
10 files changed
+264
-16
No files matched your search
@@ -427,6 +427,27 @@ ostree_sysroot_upgrader_pull (OstreeSysrootUpgrader *self,
|
||||
gboolean *out_changed,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
return ostree_sysroot_upgrader_pull_one_dir (self, NULL, flags, upgrader_flags, progress, out_changed, cancellable, error);
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_sysroot_upgrader_pull_one_dir:
|
||||
*
|
||||
* Like ostree_sysroot_upgrader_pull(), but allows retrieving just a
|
||||
* subpath of the tree. This can be used to download metadata files
|
||||
* from inside the tree such as package databases.
|
||||
*
|
||||
*/
|
||||
gboolean
|
||||
ostree_sysroot_upgrader_pull_one_dir (OstreeSysrootUpgrader *self,
|
||||
const char *dir_to_pull,
|
||||
OstreeRepoPullFlags flags,
|
||||
OstreeSysrootUpgraderPullFlags upgrader_flags,
|
||||
OstreeAsyncProgress *progress,
|
||||
gboolean *out_changed,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
gs_unref_object OstreeRepo *repo = NULL;
|
||||
@@ -448,7 +469,7 @@ ostree_sysroot_upgrader_pull (OstreeSysrootUpgrader *self,
|
||||
|
||||
if (self->origin_remote)
|
||||
{
|
||||
if (!ostree_repo_pull (repo, self->origin_remote, refs_to_fetch,
|
||||
if (!ostree_repo_pull_one_dir (repo, self->origin_remote, dir_to_pull, refs_to_fetch,
|
||||
flags, progress,
|
||||
cancellable, error))
|
||||
goto out;
|
||||
|
||||
Reference in new issue
Block a user