lib/remote: Store name of remote providing keyring for dynamic remotes
authorPhilip Withnall <withnall@endlessm.com>
Thu, 21 Sep 2017 15:04:11 +0000 (16:04 +0100)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 27 Sep 2017 16:38:07 +0000 (16:38 +0000)
commit69e332a0c034b9d0e754372b3c9d653f492a97c7
treec2927189c093b245a09f99d2bdf94788baf2b37e
parent22c1fdfbd320379a09f4a670126bc28cdc383b87
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
src/libostree/ostree-remote-private.h
src/libostree/ostree-remote.c
src/libostree/ostree-repo-finder-avahi.c
src/libostree/ostree-repo-finder-mount.c