Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2023-05-04 00:37:55 +1000
committerGitHub <noreply@github.com>2023-05-03 16:37:55 +0200
commit2d06cf592a15e69911ffa82e7d86d832bf8ca89c (patch)
tree041caf4405d5cdf0dc99987815b8b25d154011ad
parentec4ecbcb7a839ab06b739f01ce42bfd18376c620 (diff)
Fix 1772 (#1773)
Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
-rw-r--r--archinstall/lib/models/network_configuration.py13
-rw-r--r--archinstall/lib/profile/__init__.py3
-rw-r--r--archinstall/scripts/guided.py5
-rw-r--r--archinstall/scripts/swiss.py5
-rw-r--r--examples/interactive_installation.py5
5 files changed, 24 insertions, 7 deletions
diff --git a/archinstall/lib/models/network_configuration.py b/archinstall/lib/models/network_configuration.py
index 66230e24..a8795fc1 100644
--- a/archinstall/lib/models/network_configuration.py
+++ b/archinstall/lib/models/network_configuration.py
@@ -6,7 +6,7 @@ from enum import Enum
from typing import List, Optional, Dict, Union, Any, TYPE_CHECKING, Tuple
from ..output import log
-from ..storage import storage
+from ..profile import ProfileConfiguration
if TYPE_CHECKING:
_: Any
@@ -103,7 +103,11 @@ class NetworkConfigurationHandler:
def configuration(self):
return self._configuration
- def config_installer(self, installation: Any):
+ def config_installer(
+ self,
+ installation: Any,
+ profile_config: Optional[ProfileConfiguration] = None
+ ):
if self._configuration is None:
return
@@ -122,8 +126,9 @@ class NetworkConfigurationHandler:
)
elif self._configuration.is_network_manager():
installation.add_additional_packages(["networkmanager"])
- if (profile := storage['arguments'].get('profile_config')) and profile.is_desktop_type_profile:
- installation.add_additional_packages(["network-manager-applet"])
+ if profile_config and profile_config.profile:
+ if profile_config.profile.is_desktop_type_profile():
+ installation.add_additional_packages(["network-manager-applet"])
installation.enable_service('NetworkManager.service')
def _parse_manual_config(self, configs: List[Dict[str, Any]]) -> Optional[List[NetworkConfiguration]]:
diff --git a/archinstall/lib/profile/__init__.py b/archinstall/lib/profile/__init__.py
index e69de29b..6e74b0d8 100644
--- a/archinstall/lib/profile/__init__.py
+++ b/archinstall/lib/profile/__init__.py
@@ -0,0 +1,3 @@
+from .profile_menu import ProfileMenu, select_greeter, select_profile
+from .profiles_handler import profile_handler
+from .profile_model import ProfileConfiguration
diff --git a/archinstall/scripts/guided.py b/archinstall/scripts/guided.py
index 48d141b7..6419c1dc 100644
--- a/archinstall/scripts/guided.py
+++ b/archinstall/scripts/guided.py
@@ -181,7 +181,10 @@ def perform_installation(mountpoint: Path):
if network_config:
handler = NetworkConfigurationHandler(network_config)
- handler.config_installer(installation)
+ handler.config_installer(
+ installation,
+ archinstall.arguments.get('profile_config', None)
+ )
if archinstall.arguments.get('packages', None) and archinstall.arguments.get('packages', None)[0] != '':
installation.add_additional_packages(archinstall.arguments.get('packages', None))
diff --git a/archinstall/scripts/swiss.py b/archinstall/scripts/swiss.py
index 34e4c022..2712807a 100644
--- a/archinstall/scripts/swiss.py
+++ b/archinstall/scripts/swiss.py
@@ -236,7 +236,10 @@ def perform_installation(mountpoint: Path, exec_mode: ExecutionMode):
if network_config:
handler = models.NetworkConfigurationHandler(network_config)
- handler.config_installer(installation)
+ handler.config_installer(
+ installation,
+ archinstall.arguments.get('profile_config', None)
+ )
if archinstall.arguments.get('packages', None) and archinstall.arguments.get('packages', None)[0] != '':
installation.add_additional_packages(archinstall.arguments.get('packages', []))
diff --git a/examples/interactive_installation.py b/examples/interactive_installation.py
index f72f110b..8b4e393f 100644
--- a/examples/interactive_installation.py
+++ b/examples/interactive_installation.py
@@ -144,7 +144,10 @@ def perform_installation(mountpoint: Path):
if network_config:
handler = NetworkConfigurationHandler(network_config)
- handler.config_installer(installation)
+ handler.config_installer(
+ installation,
+ archinstall.arguments.get('profile_config', None)
+ )
if archinstall.arguments.get('packages', None) and archinstall.arguments.get('packages', None)[0] != '':
installation.add_additional_packages(archinstall.arguments.get('packages', []))