mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +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))
|
||||
{
|
||||
baseurl = g_strdup (remote_name_or_baseurl);
|
||||
/* For compatibility with pull-local, don't gpg verify local
|
||||
* pulls.
|
||||
*/
|
||||
pull_data->gpg_verify = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
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->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,
|
||||
GError **error)
|
||||
{
|
||||
return _ostree_repo_get_remote_boolean_option (self, name, "gpg-verify",
|
||||
TRUE, out_gpg_verify, error);
|
||||
g_return_val_if_fail (OSTREE_IS_REPO (self), FALSE);
|
||||
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