Skip to content

Commit 92dba1c

Browse files
install/composefs: Move state to /state/deploy/<image_id>
Also create `/var` inside `/state/deploy/<image_id>` as a symlink to `../../fedora/os/var` which is to be the case for every deployment Signed-off-by: Pragyan Poudyal <[email protected]>
1 parent 6d2e5e7 commit 92dba1c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

crates/lib/src/install.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,12 +1674,20 @@ fn setup_composefs_boot(root_setup: &RootSetup, state: &State, image_id: &str) -
16741674

16751675
let state_path = root_setup
16761676
.physical_root_path
1677-
.join(format!("state/{}", id.to_hex()));
1677+
.join(format!("state/deploy/{}", id.to_hex()));
16781678

1679-
create_dir_all(state_path.join("var"))?;
16801679
create_dir_all(state_path.join("etc/upper"))?;
16811680
create_dir_all(state_path.join("etc/work"))?;
16821681

1682+
let actual_var_path = root_setup
1683+
.physical_root_path
1684+
.join(format!("state/os/fedora/var"));
1685+
1686+
create_dir_all(&actual_var_path)?;
1687+
1688+
symlink(Path::new("../../os/fedora/var"), state_path.join("var"))
1689+
.context("Failed to create symlink for /var")?;
1690+
16831691
let OstreeExtImgRef {
16841692
name: image_name,
16851693
transport,

0 commit comments

Comments
 (0)