diff options
author | Colin Walters <walters@verbum.org> | 2014-03-31 22:27:34 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2014-03-31 22:27:56 -0400 |
commit | 5bca5695067333086d8e6ff592e6d00ed578a885 (patch) | |
tree | 1f19ffa9e73b01c6862dd2f6a6bc13ac01e4e770 /src/ostree/ot-admin-builtin-upgrade.c | |
parent | 913337c557d0be9a3b7b7f5251a5d12a33a5a937 (diff) | |
download | ostree-5bca5695067333086d8e6ff592e6d00ed578a885.tar.gz |
upgrade: Support --allow-downgrade again
This was unintentially dropped with the OstreeSysrootUpgrader rebase.
Diffstat (limited to 'src/ostree/ot-admin-builtin-upgrade.c')
-rw-r--r-- | src/ostree/ot-admin-builtin-upgrade.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ostree/ot-admin-builtin-upgrade.c b/src/ostree/ot-admin-builtin-upgrade.c index a2de168d..e6da241c 100644 --- a/src/ostree/ot-admin-builtin-upgrade.c +++ b/src/ostree/ot-admin-builtin-upgrade.c @@ -61,6 +61,7 @@ ot_admin_builtin_upgrade (int argc, char **argv, OstreeSysroot *sysroot, GCancel GSConsole *console; gs_unref_object OstreeAsyncProgress *progress = NULL; gboolean changed; + OstreeSysrootUpgraderPullFlags upgraderpullflags = 0; context = g_option_context_new ("Construct new tree from current origin and deploy it, if it changed"); g_option_context_add_main_entries (context, options, NULL); @@ -83,7 +84,11 @@ ot_admin_builtin_upgrade (int argc, char **argv, OstreeSysroot *sysroot, GCancel progress = ostree_async_progress_new_and_connect (ot_common_pull_progress, console); } - if (!ostree_sysroot_upgrader_pull (upgrader, 0, 0, progress, &changed, + if (opt_allow_downgrade) + upgraderpullflags |= OSTREE_SYSROOT_UPGRADER_PULL_FLAGS_ALLOW_OLDER; + + if (!ostree_sysroot_upgrader_pull (upgrader, 0, upgraderpullflags, + progress, &changed, cancellable, error)) goto out; |