Remove leftover code from unattended script (#4127)

This commit is contained in:
codefiles 2026-01-14 20:18:47 -05:00 committed by GitHub
parent e5a14c0cfe
commit 972e278555
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 1 additions and 56 deletions

View File

@ -22,7 +22,6 @@ class ProfileType(Enum):
DesktopEnv = 'Desktop Environment'
CustomType = 'CustomType'
# special things
Tailored = 'Tailored'
Application = 'Application'
@ -158,9 +157,6 @@ class Profile:
def is_xorg_type_profile(self) -> bool:
return self.profile_type == ProfileType.Xorg if self._advanced_check() else False
def is_tailored(self) -> bool:
return self.profile_type == ProfileType.Tailored
def is_custom_type_profile(self) -> bool:
return self.profile_type == ProfileType.CustomType

View File

@ -1,22 +0,0 @@
from typing import TYPE_CHECKING, override
from archinstall.default_profiles.profile import ProfileType
from archinstall.default_profiles.xorg import XorgProfile
if TYPE_CHECKING:
from archinstall.lib.installer import Installer
class TailoredProfile(XorgProfile):
def __init__(self) -> None:
super().__init__('52-54-00-12-34-56', ProfileType.Tailored)
@property
@override
def packages(self) -> list[str]:
return ['nano', 'wget', 'git']
@override
def install(self, install_session: 'Installer') -> None:
super().install(install_session)
# do whatever you like here :)

View File

@ -2,7 +2,6 @@ import importlib.util
import inspect
import sys
from collections import Counter
from functools import cached_property
from pathlib import Path
from tempfile import NamedTemporaryFile
from types import ModuleType
@ -13,7 +12,7 @@ from archinstall.lib.translationhandler import tr
from ...default_profiles.profile import GreeterType, Profile
from ..hardware import GfxDriver
from ..models.profile import ProfileConfiguration
from ..networking import fetch_data_from_url, list_interfaces
from ..networking import fetch_data_from_url
from ..output import debug, error, info
if TYPE_CHECKING:
@ -141,10 +140,6 @@ class ProfileHandler:
self._profiles = self._profiles or self._find_available_profiles()
return self._profiles
@cached_property
def _local_mac_addresses(self) -> list[str]:
return list(list_interfaces())
def add_custom_profiles(self, profiles: Profile | list[Profile]) -> None:
if not isinstance(profiles, list):
profiles = [profiles]
@ -176,10 +171,6 @@ class ProfileHandler:
def get_custom_profiles(self) -> list[Profile]:
return [p for p in self.profiles if p.is_custom_type_profile()]
def get_mac_addr_profiles(self) -> list[Profile]:
tailored = [p for p in self.profiles if p.is_tailored()]
return [t for t in tailored if t.name in self._local_mac_addresses]
def install_greeter(self, install_session: 'Installer', greeter: GreeterType) -> None:
packages = []
service = None

View File

@ -1,20 +0,0 @@
import time
from archinstall.lib.output import info
from archinstall.lib.profile.profiles_handler import profile_handler
from archinstall.lib.storage import storage
from archinstall.tui import Tui
for _profile in profile_handler.get_mac_addr_profiles():
# Tailored means it's a match for this machine
# based on its MAC address (or some other criteria
# that fits the requirements for this machine specifically).
info(f'Found a tailored profile for this machine called: "{_profile.name}"')
print('Starting install in:')
for i in range(10, 0, -1):
Tui.print(f'{i}...')
time.sleep(1)
install_session = storage['installation_session']
_profile.install(install_session)