Look for $remotename.trustedkeys.gpg in remotes.d dir

This is a nice way to add gpg keys for system configured remotes
without making them globally trusted.

Closes: #247
Approved by: cgwalters
This commit is contained in:
Alexander Larsson 2016-04-08 17:00:59 +02:00 committed by Colin Walters (automation)
parent c86e4f0c90
commit 7ac8b0442c

View File

@ -4575,6 +4575,7 @@ find_keyring (OstreeRepo *self,
OstreeRemote *remote,
GCancellable *cancellable)
{
g_autoptr(GFile) remotes_d = NULL;
g_autoptr(GFile) file = NULL;
file = g_file_get_child (self->repodir, remote->keyring);
@ -4583,6 +4584,15 @@ find_keyring (OstreeRepo *self,
return g_steal_pointer (&file);
}
remotes_d = get_remotes_d_dir (self);
if (remotes_d)
{
g_autoptr(GFile) file2 = g_file_get_child (remotes_d, remote->keyring);
if (g_file_query_exists (file2, cancellable))
return g_steal_pointer (&file2);
}
if (self->parent_repo)
return find_keyring (self->parent_repo, remote, cancellable);