Commit Graph

8 Commits

Author SHA1 Message Date
Colin Walters 1199ae9bbc Add manual bindings for MutableTree reading
I'm trying to debug a problem in ostree-rs-ext, and it's
handy to be able to do `dbg!(mtree.copy_files())`.
2022-05-06 12:53:57 -04:00
Colin Walters 6940896c4e Add a `cap-std-apis` feature with open/create
I'm trying to make more use of `cap-std` in our stack, and
this will be a key enabling API.

Actually a notable side benefit of this is that we don't need
to teach the ostree C code itself to use `openat2`, we inherit
cap-std's setup.

All of the internal ostree code using the prior `openat()` should
continue to work.

I only did basic sanity checking of this; there may be bugs
in other APIs.
2022-05-06 12:53:57 -04:00
Colin Walters f8852ca945 repo: Add `auto_transaction` and `TransactionGuard`
This gives auto-cancelling semantics on `Drop`, plus a nicer
`.commit()` method on the transaction.

Matches the currently private `_OstreeRepoAutoTransaction` in the C
library.
2022-05-06 12:53:57 -04:00
Colin Walters 8a5ac02822 Update to glib 0.14
An intimidating spam of compiler errors at the start, but the
biggest was handling the new convention of `ostree_sys::` => `ffi::`.

This will require a semver bump of course.
2022-05-06 12:53:56 -04:00
Felix Krull de0cee4ecd tests: use RepoMode::Archive (seems to be less finicky) 2022-05-06 12:53:56 -04:00
Felix Krull eec4a2287d lib: RepoCheckoutAtOptions 2022-05-06 12:53:54 -04:00
Felix Krull 80de2aa2ea Add test for checkout_tree 2022-05-06 12:53:54 -04:00
Felix Krull c89270969c Refactor tests and add test for traverse_commit 2022-05-06 12:53:53 -04:00