diff options
| author | rorka900 <rorka900@gmail.com> | 2026-04-07 17:16:28 +0300 |
|---|---|---|
| committer | rorka900 <rorka900@gmail.com> | 2026-04-07 17:16:28 +0300 |
| commit | e3b1f5f546225c8b564235b157fe09aa9488eed1 (patch) | |
| tree | df7d348cd2ac1cb5923d130b6f6563d8d7b8cad9 /src/rootfs.rs | |
| parent | ec69b740af00379d9b9d5cea2c34f981950d4a14 (diff) | |
| download | ror-e3b1f5f546225c8b564235b157fe09aa9488eed1.tar.gz ror-e3b1f5f546225c8b564235b157fe09aa9488eed1.zip | |
feat(recipe): add maintainer field and group install steps
Diffstat (limited to 'src/rootfs.rs')
| -rw-r--r-- | src/rootfs.rs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/rootfs.rs b/src/rootfs.rs index 3f06045..9af2e57 100644 --- a/src/rootfs.rs +++ b/src/rootfs.rs @@ -641,6 +641,33 @@ pub fn build_rootfs( let result = run_all_install_steps(&group.packages, &installing, target_dir); + if result.is_ok() && !group.install_steps.trim().is_empty() { + println!("{} Running group install_steps in chroot...", ">>>".cyan()); + let shell_result = find_working_shell(target_dir) + .ok_or_else(|| "No working shell found for group install_steps".to_string()); + match shell_result { + Ok((shell, subcmd)) => { + if let Err(e) = run_install_steps_in_chroot( + &group.name, + &group.install_steps, + target_dir, + shell, + subcmd, + ) { + println!("{} Unmounting virtual filesystems...", ">>>".cyan()); + umount_virtual_fs(target_dir); + return Err(e); + } + println!("{} Group install_steps done.", ">>>".green()); + } + Err(e) => { + println!("{} Unmounting virtual filesystems...", ">>>".cyan()); + umount_virtual_fs(target_dir); + return Err(e); + } + } + } + println!("{} Unmounting virtual filesystems...", ">>>".cyan()); umount_virtual_fs(target_dir); |