From b8c1942b4893912a152ca2b438995d08aceff71c Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sun, 22 Oct 2023 10:22:54 -0400 Subject: [PATCH] wip --- lib/src/config.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/src/config.rs b/lib/src/config.rs index 7d58b2264..41d0d0e12 100644 --- a/lib/src/config.rs +++ b/lib/src/config.rs @@ -476,12 +476,15 @@ async fn add( write_configmap(sysroot, &booted_deployment, name, &cfgobj, cancellable)?; println!("Stored configmap: {name}"); - // let merge_commit = merge_deployment.csum(); - // let commit = require_base_commit(repo, &merge_commit)?; - // let state = ostree_container::store::query_image_commit(repo, &commit)?; - // crate::deploy::deploy(sysroot, Some(merge_deployment), &stateroot, state, &origin).await?; - // crate::deploy::cleanup(sysroot).await?; - // println!("Queued changes for next boot"); + let new_spec = { + let mut new_spec = host.spec.clone(); + new_spec.configmap.push(name.to_owned()); + new_spec + }; + let new_spec = RequiredHostSpec::from_spec(&new_spec)?; + let stateroot = booted_deployment.osname(); + let image = host.status.booted.as_ref().query_image(); + crate::deploy::stage(sysroot, &stateroot, &fetched, &new_spec).await?; Ok(()) }