lib/repo: Add locking auto cleanup handler
Define an auto cleanup handler for use with repo locking. This is based
on the existing auto transaction cleanup. A wrapper for
ostree_repo_lock_push() is added with it. The intended usage is like so:
g_autoptr(OstreeRepoAutoLock) lock = NULL;
lock = ostree_repo_auto_lock_push (repo, lock_type, cancellable, error);
if (!lock)
return FALSE;
The functions and type are marked to be skipped by introspection since I
can't see them being usable from bindings.
Closes: #1343
Approved by: cgwalters
This commit is contained in:
1 parent
4e78ddd2da
commit
7d863ed9e4
6 files changed
+93
No files matched your search
@@ -94,6 +94,8 @@ LIBOSTREE_2017.14_EXPERIMENTAL {
|
||||
global:
|
||||
ostree_remote_get_type;
|
||||
ostree_remote_get_url;
|
||||
ostree_repo_auto_lock_cleanup;
|
||||
ostree_repo_auto_lock_push;
|
||||
ostree_repo_lock_pop;
|
||||
ostree_repo_lock_push;
|
||||
} LIBOSTREE_2017.13_EXPERIMENTAL;
|
||||
Reference in new issue
Block a user