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(
1442
1442
anyhow:: bail!( "Not a mountpoint: {root_path}" ) ;
1443
1443
}
1444
1444
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
+
1445
1452
// Check to see if this happens to be the real host root
1446
1453
if !fsopts. acknowledge_destructive {
1447
1454
warn_on_host_root ( & rootfs_fd) ?;
1448
1455
}
1449
1456
1450
- // Gather global state, destructuring the provided options
1451
- let state = prepare_install ( opts. config_opts , opts. source_opts , opts. target_opts ) . await ?;
1452
-
1453
1457
match fsopts. replace {
1454
1458
Some ( ReplaceMode :: Wipe ) => {
1455
1459
let rootfs_fd = rootfs_fd. try_clone ( ) ?;
You can’t perform that action at this time.
0 commit comments