Skip to content

Commit 604cbb6

Browse files
authored
Merge pull request #782 from omertuc/issue781
install: `sysroot.init_osname` API instead of CLI
2 parents fee30a2 + 79bc580 commit 604cbb6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/src/install.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -603,13 +603,14 @@ async fn initialize_ostree_root(state: &State, root_setup: &RootSetup) -> Result
603603
.cwd_dir(rootfs_dir.try_clone()?)
604604
.run()?;
605605
}
606-
Task::new("Initializing sysroot", "ostree")
607-
.args(["admin", "os-init", stateroot, "--sysroot", "."])
608-
.cwd(rootfs_dir)?
609-
.run()?;
610606

611607
let sysroot = ostree::Sysroot::new(Some(&gio::File::for_path(rootfs)));
612608
sysroot.load(cancellable)?;
609+
610+
sysroot
611+
.init_osname(stateroot, cancellable)
612+
.context("initializing stateroot")?;
613+
613614
let sysroot_dir = Dir::reopen_dir(&crate::utils::sysroot_fd(&sysroot))?;
614615

615616
state.tempdir.create_dir("temp-run")?;

0 commit comments

Comments
 (0)