repo: Add an internal struct to manage remotes

OstreeRemote is a reference-counted struct that encompasses data about a
remote, whether read from a configuration file or created explicitly via
ostree_repo_remote_add().

OstreeRemotes are held in an internal table indexed by remote name.
This solves some problems caused by merging system-wide remote data into
the OstreeRepo's internal config key file.

Also fixes https://bugzilla.gnome.org/show_bug.cgi?id=740911
This commit is contained in:
Matthew Barnes committed 2014-12-08 12:49:10 -05:00
1 parent f3dcb7a052
commit 17b9e399b8
2 files changed
+278 -95

No files matched your search

+2
View File
@@ -68,6 +68,8 @@ struct OstreeRepo {
gid_t target_owner_gid;
GKeyFile *config;
GHashTable *remotes;
GMutex remotes_lock;
OstreeRepoMode mode;
gboolean enable_uncompressed_cache;
gboolean generate_sizes;