Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/profile
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2023-05-06 16:09:58 +1000
committerGitHub <noreply@github.com>2023-05-06 08:09:58 +0200
commit235c1190b003b8f69ff344d6e2ac31f4bd1d0ba2 (patch)
treead9919b7452d501d3d4e8e0a94c8af92789c0f3f /archinstall/lib/profile
parentf0fc6a77f21aabacc1c9ef772875f8dd97344af8 (diff)
Fix 1763 (#1790)
* Fix 1763 --------- Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/profile')
-rw-r--r--archinstall/lib/profile/profiles_handler.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/archinstall/lib/profile/profiles_handler.py b/archinstall/lib/profile/profiles_handler.py
index 824849c3..6ed95f8e 100644
--- a/archinstall/lib/profile/profiles_handler.py
+++ b/archinstall/lib/profile/profiles_handler.py
@@ -43,6 +43,7 @@ class ProfileHandler:
data = {
'main': profile.name,
'details': [profile.name for profile in profile.current_selection],
+ 'custom_settings': {profile.name: profile.custom_settings for profile in profile.current_selection}
}
if self._url_path is not None:
@@ -98,6 +99,7 @@ class ProfileHandler:
profile = self.get_profile_by_name(main) if main else None
valid: List[Profile] = []
+
if details := profile_config.get('details', []):
resolved = {detail: self.get_profile_by_name(detail) for detail in details if detail}
valid = [p for p in resolved.values() if p is not None]
@@ -106,6 +108,12 @@ class ProfileHandler:
if invalid:
log(f'No profile definition found: {invalid}')
+ custom_settings = profile_config.get('custom_settings', {})
+ for profile in valid:
+ profile.set_custom_settings(
+ custom_settings.get(profile.name, {})
+ )
+
if profile is not None:
profile.set_current_selection(valid)