upgrade: Add support for --pull-only and --deploy-only
This makes it easier to script downloading updates in the background, and only do deployments just before rebooting. Partially addresses https://github.com/ostreedev/ostree/issues/640 Closes: #642 Approved by: jlebon
This commit is contained in:
1 parent
2c326d705e
commit
36b28cb4d2
6 files changed
+125
-7
No files matched your search
@@ -552,7 +552,8 @@ ostree_sysroot_upgrader_pull_one_dir (OstreeSysrootUpgrader *self,
|
||||
g_assert (self->merge_deployment);
|
||||
from_revision = ostree_deployment_get_csum (self->merge_deployment);
|
||||
|
||||
if (self->origin_remote)
|
||||
if (self->origin_remote &&
|
||||
(upgrader_flags & OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC) == 0)
|
||||
{
|
||||
if (!ostree_repo_pull_one_dir (repo, self->origin_remote, dir_to_pull, refs_to_fetch,
|
||||
flags, progress,
|
||||
|
||||
@@ -85,7 +85,8 @@ gboolean ostree_sysroot_upgrader_check_timestamps (OstreeRepo *repo,
|
||||
|
||||
typedef enum {
|
||||
OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_NONE = 0,
|
||||
OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER = (1 << 0)
|
||||
OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER = (1 << 0),
|
||||
OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_SYNTHETIC = (1 << 1) /* Don't actually do a pull, just check timestamps/changed */
|
||||
} OstreeSysrootUpgraderPullFlags;
|
||||
|
||||
_OSTREE_PUBLIC
|
||||
|
||||
Reference in new issue
Block a user