|

feat(config): add [install].chroot_scripts and no_chroot override

Author: Chris Tusa <chris.tusa@leafscale.com>
Date: Jul 05, 2026 17:13
Changeset: 4947137b7532bfa016b60f4aa8d3604e94754f2b
Branch: default

Changed files:

Diff

diff -r 026265f1ae95 -r 4947137b7532 src/core/config.reef
--- a/src/core/config.reef	Sun Jul 05 17:09:01 2026 -0500
+++ b/src/core/config.reef	Sun Jul 05 17:13:28 2026 -0500
@@ -56,7 +56,7 @@
     fn get_install_prefix(cfg: Config): string
 
     // Apply command-line overrides to config
-    fn apply_overrides(cfg: Config, root: string, prefix: string): Config
+    fn apply_overrides(cfg: Config, root: string, prefix: string, no_chroot: bool): Config
 
     // Build settings
     fn get_cflags(cfg: Config): string
@@ -85,6 +85,9 @@
     // Security settings
     fn get_require_signed_repos(cfg: Config): bool
     fn get_require_signed_packages(cfg: Config): bool
+
+    // Install settings
+    fn get_chroot_scripts(cfg: Config): bool
 end export
 
 // Configuration structure
@@ -136,6 +139,9 @@
     // [security]
     require_signed_repos: bool
     require_signed_packages: bool
+
+    // [install]
+    chroot_scripts: bool
 end Config
 
 // Create a default configuration
@@ -187,7 +193,10 @@
 
         // Security
         require_signed_repos: false,
-        require_signed_packages: false
+        require_signed_packages: false,
+
+        // Install
+        chroot_scripts: true
     }
 end default_config
 
@@ -330,6 +339,11 @@
         cfg.require_signed_packages = toml.toml_get_bool(keys, vals, entry_count, "security.require_signed_packages")
     end if
 
+    // [install] section
+    if toml.toml_has_key(keys, vals, entry_count, "install.chroot_scripts")
+        cfg.chroot_scripts = toml.toml_get_bool(keys, vals, entry_count, "install.chroot_scripts")
+    end if
+
     return cfg
 end load
 
@@ -455,6 +469,10 @@
     return cfg.require_signed_packages
 end get_require_signed_packages
 
+fn get_chroot_scripts(cfg: Config): bool
+    return cfg.chroot_scripts
+end get_chroot_scripts
+
 // Get the alternate root path (empty string means /)
 fn get_root(cfg: Config): string
     return cfg.root
@@ -489,7 +507,7 @@
 
 // Apply command-line overrides to config
 // Call this after loading config to override with --root and --prefix flags
-fn apply_overrides(cfg: Config, root: string, prefix: string): Config
+fn apply_overrides(cfg: Config, root: string, prefix: string, no_chroot: bool): Config
     mut result = cfg
     if str.length(root) > 0
         result.root = root
@@ -497,6 +515,9 @@
     if str.length(prefix) > 0
         result.prefix = prefix
     end if
+    if no_chroot
+        result.chroot_scripts = false
+    end if
     return result
 end apply_overrides