Add more flexible _remote_change() API , expose via 'ostree remote'
For Anaconda, I needed OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS, with the GFile *sysroot argument to avoid ugly hacks. We want to write the content provided via "ostreesetup" as a remote to the target chroot only in the case where it isn't provided as part of the tree content itself. This is also potentially useful in idempotent systems management tools like Ansible. https://bugzilla.gnome.org/show_bug.cgi?id=741577
This commit is contained in:
1 parent
8067e977a7
commit
f6a6e68412
4 files changed
+193
-44
No files matched your search
@@ -79,6 +79,22 @@ gboolean ostree_repo_remote_delete (OstreeRepo *self,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
typedef enum {
|
||||
OSTREE_REPO_REMOTE_CHANGE_ADD,
|
||||
OSTREE_REPO_REMOTE_CHANGE_ADD_IF_NOT_EXISTS,
|
||||
OSTREE_REPO_REMOTE_CHANGE_DELETE,
|
||||
OSTREE_REPO_REMOTE_CHANGE_DELETE_IF_EXISTS
|
||||
} OstreeRepoRemoteChange;
|
||||
|
||||
gboolean ostree_repo_remote_change (OstreeRepo *self,
|
||||
GFile *sysroot,
|
||||
OstreeRepoRemoteChange changeop,
|
||||
const char *name,
|
||||
const char *url,
|
||||
GVariant *options,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
|
||||
gboolean ostree_repo_remote_get_url (OstreeRepo *self,
|
||||
const char *name,
|
||||
char **out_url,
|
||||
|
||||
Reference in new issue
Block a user