File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1442,14 +1442,18 @@ pub(crate) async fn install_to_filesystem(
14421442 anyhow:: bail!( "Not a mountpoint: {root_path}" ) ;
14431443 }
14441444
1445+ // Gather global state, destructuring the provided options.
1446+ // IMPORTANT: We might re-execute the current process in this function (for SELinux among other things)
1447+ // IMPORTANT: and hence anything that is done before MUST BE IDEMPOTENT.
1448+ // IMPORTANT: In practice, we should only be gathering information before this point,
1449+ // IMPORTANT: and not performing any mutations at all.
1450+ let state = prepare_install ( opts. config_opts , opts. source_opts , opts. target_opts ) . await ?;
1451+
14451452 // Check to see if this happens to be the real host root
14461453 if !fsopts. acknowledge_destructive {
14471454 warn_on_host_root ( & rootfs_fd) ?;
14481455 }
14491456
1450- // Gather global state, destructuring the provided options
1451- let state = prepare_install ( opts. config_opts , opts. source_opts , opts. target_opts ) . await ?;
1452-
14531457 match fsopts. replace {
14541458 Some ( ReplaceMode :: Wipe ) => {
14551459 let rootfs_fd = rootfs_fd. try_clone ( ) ?;
You can’t perform that action at this time.
0 commit comments