diff --git a/rust-bindings/rust/conf/ostree.toml b/rust-bindings/rust/conf/ostree.toml
index d2c01499..ca6a5582 100644
--- a/rust-bindings/rust/conf/ostree.toml
+++ b/rust-bindings/rust/conf/ostree.toml
@@ -14,6 +14,7 @@ generate = [
"OSTree.AsyncProgress",
"OSTree.GpgSignatureFormatFlags",
"OSTree.GpgVerifyResult",
+ "OSTree.MutableTree",
"OSTree.ObjectType",
"OSTree.Remote",
"OSTree.RepoCheckoutMode",
@@ -21,6 +22,7 @@ generate = [
"OSTree.RepoCommitModifier",
"OSTree.RepoCommitState",
"OSTree.RepoDevInoCache",
+ "OSTree.RepoListRefsExtFlags",
"OSTree.RepoMode",
"OSTree.RepoPruneFlags",
"OSTree.RepoPullFlags",
@@ -30,7 +32,6 @@ generate = [
"OSTree.SePolicy",
"OSTree.SePolicyRestoreconFlags",
"OSTree.StaticDeltaGenerateOpt",
- "OSTree.RepoListRefsExtFlags",
#"OSTree.RepoPruneOptions",
#"OSTree.RepoExportArchiveOptions",
@@ -64,28 +65,19 @@ status = "manual"
name = "dup"
ignore = true
-[[object]]
-name = "OSTree.MutableTree"
-status = "generate"
- [[object.function]]
- pattern = "lookup"
- ignore = true
-
[[object]]
name = "OSTree.Repo"
status = "generate"
[[object.function]]
+ # not sure what's wrong with this method; might be a gir issue
+ name = "write_metadata_async"
+ ignore = true
+
+ [[object.function]]
+ # async generates bad code for now; revisit with newer gir
pattern = ".+_async"
ignore = true
- [[object.function]]
- pattern = "mode_from_string"
- ignore = true
-
- [[object.function]]
- pattern = "remote_gpg_import"
- ignore = true
-
[[object]]
name = "OSTree.RepoFile"
status = "generate"
diff --git a/rust-bindings/rust/gir-files/OSTree-1.0.gir b/rust-bindings/rust/gir-files/OSTree-1.0.gir
index e144a270..53f62efe 100644
--- a/rust-bindings/rust/gir-files/OSTree-1.0.gir
+++ b/rust-bindings/rust/gir-files/OSTree-1.0.gir
@@ -2122,15 +2122,25 @@ the contents will be loaded only when needed.
+ Tree
+ name
-
+
+ checksum
-
+
+ subdirectory
@@ -2492,9 +2502,14 @@ The @options dict may contain:
+ a repo mode as a string
-
+
+ the corresponding #OstreeRepoMode
@@ -5298,8 +5313,10 @@ from the remote named @name.
return location for the number of imported
keys, or %NULL
diff --git a/rust-bindings/rust/src/auto/mutable_tree.rs b/rust-bindings/rust/src/auto/mutable_tree.rs
index 5fc898f5..0844fc81 100644
--- a/rust-bindings/rust/src/auto/mutable_tree.rs
+++ b/rust-bindings/rust/src/auto/mutable_tree.rs
@@ -61,6 +61,8 @@ pub trait MutableTreeExt {
//fn get_subdirs(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 1, id: 37 };
+ fn lookup(&self, name: &str) -> Result<(String, MutableTree), Error>;
+
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn remove(&self, name: &str, allow_noent: bool) -> Result<(), Error>;
@@ -123,6 +125,16 @@ impl> MutableTreeExt for O {
// unsafe { TODO: call ffi::ostree_mutable_tree_get_subdirs() }
//}
+ fn lookup(&self, name: &str) -> Result<(String, MutableTree), Error> {
+ unsafe {
+ let mut out_file_checksum = ptr::null_mut();
+ let mut out_subdir = ptr::null_mut();
+ let mut error = ptr::null_mut();
+ let _ = ffi::ostree_mutable_tree_lookup(self.to_glib_none().0, name.to_glib_none().0, &mut out_file_checksum, &mut out_subdir, &mut error);
+ if error.is_null() { Ok((from_glib_full(out_file_checksum), from_glib_full(out_subdir))) } else { Err(from_glib_full(error)) }
+ }
+ }
+
#[cfg(any(feature = "v2018_9", feature = "dox"))]
fn remove(&self, name: &str, allow_noent: bool) -> Result<(), Error> {
unsafe {
diff --git a/rust-bindings/rust/src/auto/repo.rs b/rust-bindings/rust/src/auto/repo.rs
index 1f3216d5..aa743049 100644
--- a/rust-bindings/rust/src/auto/repo.rs
+++ b/rust-bindings/rust/src/auto/repo.rs
@@ -81,6 +81,15 @@ impl Repo {
}
}
+ pub fn mode_from_string(mode: &str) -> Result {
+ unsafe {
+ let mut out_mode = mem::uninitialized();
+ let mut error = ptr::null_mut();
+ let _ = ffi::ostree_repo_mode_from_string(mode.to_glib_none().0, &mut out_mode, &mut error);
+ if error.is_null() { Ok(from_glib(out_mode)) } else { Err(from_glib_full(error)) }
+ }
+ }
+
#[cfg(any(feature = "v2017_10", feature = "dox"))]
pub fn open_at<'a, P: Into