mirror of
https://github.com/ostreedev/ostree.git
synced 2025-01-11 09:18:20 +03:00
repo: Handle "file" remotes in ostree_repo_remote_get_gpg_verify()
This commit is contained in:
parent
e592faec43
commit
d4111aeac0
@ -1673,20 +1673,16 @@ ostree_repo_pull_with_options (OstreeRepo *self,
|
|||||||
if (_ostree_repo_remote_name_is_file (remote_name_or_baseurl))
|
if (_ostree_repo_remote_name_is_file (remote_name_or_baseurl))
|
||||||
{
|
{
|
||||||
baseurl = g_strdup (remote_name_or_baseurl);
|
baseurl = g_strdup (remote_name_or_baseurl);
|
||||||
/* For compatibility with pull-local, don't gpg verify local
|
|
||||||
* pulls.
|
|
||||||
*/
|
|
||||||
pull_data->gpg_verify = FALSE;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pull_data->remote_name = g_strdup (remote_name_or_baseurl);
|
pull_data->remote_name = g_strdup (remote_name_or_baseurl);
|
||||||
|
|
||||||
if (!ostree_repo_remote_get_gpg_verify (self, remote_name_or_baseurl,
|
|
||||||
&pull_data->gpg_verify, error))
|
|
||||||
goto out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ostree_repo_remote_get_gpg_verify (self, remote_name_or_baseurl,
|
||||||
|
&pull_data->gpg_verify, error))
|
||||||
|
goto out;
|
||||||
|
|
||||||
pull_data->phase = OSTREE_PULL_PHASE_FETCHING_REFS;
|
pull_data->phase = OSTREE_PULL_PHASE_FETCHING_REFS;
|
||||||
|
|
||||||
pull_data->fetcher = _ostree_repo_remote_new_fetcher (self, remote_name_or_baseurl, error);
|
pull_data->fetcher = _ostree_repo_remote_new_fetcher (self, remote_name_or_baseurl, error);
|
||||||
|
@ -1248,8 +1248,19 @@ ostree_repo_remote_get_gpg_verify (OstreeRepo *self,
|
|||||||
gboolean *out_gpg_verify,
|
gboolean *out_gpg_verify,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
return _ostree_repo_get_remote_boolean_option (self, name, "gpg-verify",
|
g_return_val_if_fail (OSTREE_IS_REPO (self), FALSE);
|
||||||
TRUE, out_gpg_verify, error);
|
g_return_val_if_fail (name != NULL, FALSE);
|
||||||
|
|
||||||
|
/* For compatibility with pull-local, don't GPG verify file:// URIs. */
|
||||||
|
if (_ostree_repo_remote_name_is_file (name))
|
||||||
|
{
|
||||||
|
if (out_gpg_verify != NULL)
|
||||||
|
*out_gpg_verify = FALSE;
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _ostree_repo_get_remote_boolean_option (self, name, "gpg-verify",
|
||||||
|
TRUE, out_gpg_verify, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user