lib/repo: Add locking auto cleanup handler
authorDan Nicholson <nicholson@endlessm.com>
Fri, 13 Oct 2017 19:31:35 +0000 (19:31 +0000)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 5 Dec 2017 02:32:47 +0000 (02:32 +0000)
commit7d863ed9e4c15725c8439b389b5657872db1bd85
treedc30089c6cc03878725491d0e478a7633ed0e8ef
parent4e78ddd2da4c0a2ced9527ef20a30f8e3b8567b8
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
apidoc/ostree-experimental-sections.txt
src/libostree/libostree-experimental.sym
src/libostree/ostree-autocleanups.h
src/libostree/ostree-repo-private.h
src/libostree/ostree-repo.c
src/libostree/ostree-repo.h