gpg: do not fail GPG-related configuration get for remote
We don't need anymore stubs for verification options for remotes in case if ostree built without GPG support. Signed-off-by: Denis Pynkin <denis.pynkin@collabora.com>
This commit is contained in:
parent
65c16a8318
commit
809176b1ff
|
|
@ -3986,7 +3986,6 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
g_free (pull_data->remote_name);
|
g_free (pull_data->remote_name);
|
||||||
pull_data->remote_name = g_strdup (remote_name_or_baseurl);
|
pull_data->remote_name = g_strdup (remote_name_or_baseurl);
|
||||||
|
|
||||||
#ifndef OSTREE_DISABLE_GPGME
|
|
||||||
/* Fetch GPG verification settings from remote if it wasn't already
|
/* Fetch GPG verification settings from remote if it wasn't already
|
||||||
* explicitly set in the options. */
|
* explicitly set in the options. */
|
||||||
if (!opt_gpg_verify_set)
|
if (!opt_gpg_verify_set)
|
||||||
|
|
@ -3998,7 +3997,6 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
||||||
if (!ostree_repo_remote_get_gpg_verify_summary (self, pull_data->remote_name,
|
if (!ostree_repo_remote_get_gpg_verify_summary (self, pull_data->remote_name,
|
||||||
&pull_data->gpg_verify_summary, error))
|
&pull_data->gpg_verify_summary, error))
|
||||||
goto out;
|
goto out;
|
||||||
#endif /* OSTREE_DISABLE_GPGME */
|
|
||||||
/* Fetch verification settings from remote if it wasn't already
|
/* Fetch verification settings from remote if it wasn't already
|
||||||
* explicitly set in the options. */
|
* explicitly set in the options. */
|
||||||
if (!opt_sign_verify_set)
|
if (!opt_sign_verify_set)
|
||||||
|
|
@ -6460,9 +6458,7 @@ ostree_repo_remote_fetch_summary_with_options (OstreeRepo *self,
|
||||||
g_autofree char *metalink_url_string = NULL;
|
g_autofree char *metalink_url_string = NULL;
|
||||||
g_autoptr(GBytes) summary = NULL;
|
g_autoptr(GBytes) summary = NULL;
|
||||||
g_autoptr(GBytes) signatures = NULL;
|
g_autoptr(GBytes) signatures = NULL;
|
||||||
#ifndef OSTREE_DISABLE_GPGME
|
|
||||||
gboolean gpg_verify_summary;
|
gboolean gpg_verify_summary;
|
||||||
#endif
|
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
gboolean summary_is_from_cache;
|
gboolean summary_is_from_cache;
|
||||||
|
|
||||||
|
|
@ -6484,7 +6480,6 @@ ostree_repo_remote_fetch_summary_with_options (OstreeRepo *self,
|
||||||
error))
|
error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
#ifndef OSTREE_DISABLE_GPGME
|
|
||||||
if (!ostree_repo_remote_get_gpg_verify_summary (self, name, &gpg_verify_summary, error))
|
if (!ostree_repo_remote_get_gpg_verify_summary (self, name, &gpg_verify_summary, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
|
@ -6538,10 +6533,6 @@ ostree_repo_remote_fetch_summary_with_options (OstreeRepo *self,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
g_message ("%s: GPG feature is disabled in a build time", __FUNCTION__);
|
|
||||||
#endif /* OSTREE_DISABLE_GPGME */
|
|
||||||
|
|
||||||
if (out_summary != NULL)
|
if (out_summary != NULL)
|
||||||
*out_summary = g_steal_pointer (&summary);
|
*out_summary = g_steal_pointer (&summary);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2028,17 +2028,8 @@ ostree_repo_remote_get_gpg_verify (OstreeRepo *self,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef OSTREE_DISABLE_GPGME
|
|
||||||
return ostree_repo_get_remote_boolean_option (self, name, "gpg-verify",
|
return ostree_repo_get_remote_boolean_option (self, name, "gpg-verify",
|
||||||
TRUE, out_gpg_verify, error);
|
TRUE, out_gpg_verify, error);
|
||||||
#else
|
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
|
||||||
"'%s': GPG feature is disabled in a build time",
|
|
||||||
__FUNCTION__);
|
|
||||||
if (out_gpg_verify != NULL)
|
|
||||||
*out_gpg_verify = FALSE;
|
|
||||||
return FALSE;
|
|
||||||
#endif /* OSTREE_DISABLE_GPGME */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2060,17 +2051,8 @@ ostree_repo_remote_get_gpg_verify_summary (OstreeRepo *self,
|
||||||
gboolean *out_gpg_verify_summary,
|
gboolean *out_gpg_verify_summary,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
#ifndef OSTREE_DISABLE_GPGME
|
|
||||||
return ostree_repo_get_remote_boolean_option (self, name, "gpg-verify-summary",
|
return ostree_repo_get_remote_boolean_option (self, name, "gpg-verify-summary",
|
||||||
FALSE, out_gpg_verify_summary, error);
|
FALSE, out_gpg_verify_summary, error);
|
||||||
#else
|
|
||||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
|
||||||
"'%s': GPG feature is disabled in a build time",
|
|
||||||
__FUNCTION__);
|
|
||||||
if (out_gpg_verify_summary != NULL)
|
|
||||||
*out_gpg_verify_summary = FALSE;
|
|
||||||
return FALSE;
|
|
||||||
#endif /* OSTREE_DISABLE_GPGME */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue