diff options
author | Philip Withnall <withnall@endlessm.com> | 2017-09-21 16:04:11 +0100 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-09-27 16:38:07 +0000 |
commit | 69e332a0c034b9d0e754372b3c9d653f492a97c7 (patch) | |
tree | c2927189c093b245a09f99d2bdf94788baf2b37e /src/libostree/ostree-repo-finder-mount.c | |
parent | 22c1fdfbd320379a09f4a670126bc28cdc383b87 (diff) | |
download | ostree-69e332a0c034b9d0e754372b3c9d653f492a97c7.tar.gz |
lib/remote: Store name of remote providing keyring for dynamic remotes
When pulling from a dynamic (peer to peer) remote, the remote’s name is
set to a unique, generated string which doesn’t exist in repo/config. If
doing a non-mirror pull, however, we don’t want to use this name in the
refspecs for newly created or updated refs — we want to use the name of
the remote which provided the keyring for the pull (this will be a
remote from repo/config whose collection ID matches that being used for
the peer to peer pull).
Store both names in OstreeRemote. The name to use for refspecs is stored
as refspec_name, and is typically NULL unless it differs from name.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Closes: #1202
Approved by: cgwalters
Diffstat (limited to 'src/libostree/ostree-repo-finder-mount.c')
-rw-r--r-- | src/libostree/ostree-repo-finder-mount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libostree/ostree-repo-finder-mount.c b/src/libostree/ostree-repo-finder-mount.c index 7dcbab89..c385e70c 100644 --- a/src/libostree/ostree-repo-finder-mount.c +++ b/src/libostree/ostree-repo-finder-mount.c @@ -513,7 +513,7 @@ ostree_repo_finder_mount_resolve_async (OstreeRepoFinder *finde /* Build an #OstreeRemote. Use the escaped URI, since remote->name * is used in file paths, so needs to not contain special characters. */ g_autofree gchar *name = uri_and_keyring_to_name (repo); - remote = ostree_remote_new (name); + remote = ostree_remote_new_dynamic (name, repo->keyring_remote->name); g_clear_pointer (&remote->keyring, g_free); remote->keyring = g_strdup (repo->keyring_remote->keyring); |