diff --git a/src/ostree/ot-builtin-pull.c b/src/ostree/ot-builtin-pull.c index 52a55375..7981f18a 100644 --- a/src/ostree/ot-builtin-pull.c +++ b/src/ostree/ot-builtin-pull.c @@ -208,6 +208,7 @@ ostree_builtin_pull (int argc, char **argv, GCancellable *cancellable, GError ** { GVariantBuilder builder; + g_autoptr(GVariant) options = NULL; g_auto(GLnxConsoleRef) console = { 0, }; g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}")); @@ -265,7 +266,9 @@ ostree_builtin_pull (int argc, char **argv, GCancellable *cancellable, GError ** &console); } - if (!ostree_repo_pull_with_options (repo, remote, g_variant_builder_end (&builder), + options = g_variant_ref_sink (g_variant_builder_end (&builder)); + + if (!ostree_repo_pull_with_options (repo, remote, options, progress, cancellable, error)) goto out; diff --git a/src/ostree/ot-remote-builtin-add.c b/src/ostree/ot-remote-builtin-add.c index 6e83b2af..9d275cb5 100644 --- a/src/ostree/ot-remote-builtin-add.c +++ b/src/ostree/ot-remote-builtin-add.c @@ -50,6 +50,7 @@ ot_remote_builtin_add (int argc, char **argv, GCancellable *cancellable, GError const char *remote_url; char **iter; g_autoptr(GVariantBuilder) optbuilder = NULL; + g_autoptr(GVariant) options = NULL; gboolean ret = FALSE; context = g_option_context_new ("NAME [metalink=|mirrorlist=]URL [BRANCH...] - Add a remote repository"); @@ -109,11 +110,13 @@ ot_remote_builtin_add (int argc, char **argv, GCancellable *cancellable, GError "gpg-verify", g_variant_new_variant (g_variant_new_boolean (FALSE))); + options = g_variant_ref_sink (g_variant_builder_end (optbuilder)); + if (!ostree_repo_remote_change (repo, NULL, opt_if_not_exists ? OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS : OSTREE_REPO_REMOTE_CHANGE_ADD, remote_name, remote_url, - g_variant_builder_end (optbuilder), + options, cancellable, error)) goto out;