Skip to content

Commit

Permalink
install: Rename clashing variable
Browse files Browse the repository at this point in the history
I will need to access the outer `state` here in a later PR.

Signed-off-by: Colin Walters <[email protected]>
  • Loading branch information
cgwalters committed Feb 2, 2024
1 parent 70a6c76 commit fe1d470
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/src/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,9 @@ async fn initialize_ostree_root_from_self(
options.proxy_cfg = proxy_cfg;
println!("Creating initial deployment");
let target_image = state.target_imgref.to_string();
let state =
let imgstate =
ostree_container::deploy::deploy(&sysroot, stateroot, &src_imageref, Some(options)).await?;
let digest = state.manifest_digest.as_str();
let digest = imgstate.manifest_digest.as_str();
println!("Installed: {target_image}");
println!(" Digest: {digest}");

Expand Down Expand Up @@ -598,7 +598,7 @@ async fn initialize_ostree_root_from_self(

let uname = rustix::system::uname();

let labels = crate::status::labels_of_config(&state.configuration);
let labels = crate::status::labels_of_config(&imgstate.configuration);
let timestamp = labels
.and_then(|l| {
l.get(oci_spec::image::ANNOTATION_CREATED)
Expand All @@ -607,7 +607,7 @@ async fn initialize_ostree_root_from_self(
.and_then(crate::status::try_deserialize_timestamp);
let aleph = InstallAleph {
image: src_imageref.imgref.name.clone(),
version: state.version().as_ref().map(|s| s.to_string()),
version: imgstate.version().as_ref().map(|s| s.to_string()),
timestamp,
kernel: uname.release().to_str()?.to_string(),
};
Expand Down

0 comments on commit fe1d470

Please sign in to comment.