Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/default_profiles/profile.py
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/default_profiles/profile.py
parentf0fc6a77f21aabacc1c9ef772875f8dd97344af8 (diff)
Fix 1763 (#1790)
* Fix 1763 --------- Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/default_profiles/profile.py')
-rw-r--r--archinstall/default_profiles/profile.py25
1 files changed, 10 insertions, 15 deletions
diff --git a/archinstall/default_profiles/profile.py b/archinstall/default_profiles/profile.py
index c7d6b3dc..b1ad1f50 100644
--- a/archinstall/default_profiles/profile.py
+++ b/archinstall/default_profiles/profile.py
@@ -1,6 +1,5 @@
from __future__ import annotations
-from dataclasses import dataclass
from enum import Enum, auto
from typing import List, Optional, Any, Dict, TYPE_CHECKING, TypeVar
@@ -43,20 +42,6 @@ class SelectResult(Enum):
ResetCurrent = auto()
-@dataclass
-class ProfileInfo:
- name: str
- details: Optional[str]
- gfx_driver: Optional[str] = None
- greeter: Optional[str] = None
-
- @property
- def absolute_name(self) -> str:
- if self.details is not None:
- return self.details
- return self.name
-
-
class Profile:
def __init__(
self,
@@ -72,6 +57,8 @@ class Profile:
self.name = name
self.description = description
self.profile_type = profile_type
+ self.custom_settings: Dict[str, Any] = {}
+
self._support_gfx_driver = support_gfx_driver
self._support_greeter = support_greeter
@@ -135,6 +122,14 @@ class Profile:
"""
return SelectResult.NewSelection
+ def set_custom_settings(self, settings: Dict[str, Any]):
+ """
+ Set the custom settings for the profile.
+ This is also called when the settings are parsed from the config
+ and can be overriden to perform further actions based on the profile
+ """
+ self.custom_settings = settings
+
def current_selection_names(self) -> List[str]:
if self._current_selection:
return [s.name for s in self._current_selection]