Skip to content

Commit 510b9b5

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 afadfbd commit 510b9b5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

lib/src/install.rs

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

16821682
let state_path = root_setup
16831683
.physical_root_path
1684-
.join(format!("state/{}", id.to_hex()));
1684+
.join(format!("state/deploy/{}", id.to_hex()));
16851685

1686-
create_dir_all(state_path.join("var"))?;
16871686
create_dir_all(state_path.join("etc/upper"))?;
16881687
create_dir_all(state_path.join("etc/work"))?;
16891688

1689+
let actual_var_path = root_setup
1690+
.physical_root_path
1691+
.join(format!("state/os/fedora/var"));
1692+
1693+
create_dir_all(&actual_var_path)?;
1694+
1695+
symlink(Path::new("../../os/fedora/var"), state_path.join("var"))
1696+
.context("Failed to create symlink for /var")?;
1697+
16901698
let OstreeExtImgRef {
16911699
name: image_name,
16921700
transport,

0 commit comments

Comments
 (0)