a76ddf0cef
Now always based on an overlayfs:
f2773c1b55
This fixes a whole swath of problems with the previous design,
including the danger in replacing `/usr/lib/ostree-boot` which
broke booting for some people.
Further, we don't need to push a rollback deployment; the livefs
changes are always transient. So now we store livefs state
in `/run` instead of in the origin file.
Since we're doing a rewrite, it's now in Rust for much more safety.
We also always work in terms of incremental diffs between commits;
the previous huge hammer of swapping `/usr` was way too dangerous.
21 lines
663 B
Rust
21 lines
663 B
Rust
//! Utility helpers or workarounds for incorrectly bound things in ostree-rs
|
|
use glib::translate::*;
|
|
use std::ptr;
|
|
|
|
pub(crate) fn sysroot_query_deployments_for(
|
|
sysroot: &ostree::Sysroot,
|
|
osname: &str,
|
|
) -> (Option<ostree::Deployment>, Option<ostree::Deployment>) {
|
|
unsafe {
|
|
let mut out_pending = ptr::null_mut();
|
|
let mut out_rollback = ptr::null_mut();
|
|
ostree_sys::ostree_sysroot_query_deployments_for(
|
|
sysroot.to_glib_none().0,
|
|
osname.to_glib_none().0,
|
|
&mut out_pending,
|
|
&mut out_rollback,
|
|
);
|
|
(from_glib_full(out_pending), from_glib_full(out_rollback))
|
|
}
|
|
}
|