Refactor default partition table (#3194)

This commit is contained in:
codefiles 2025-02-23 02:51:25 -05:00 committed by GitHub
parent d69441a2da
commit a51475e0ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,6 @@ from typing import TYPE_CHECKING
from archinstall.tui import Tui
from ..hardware import SysInfo
from ..interactions.general_conf import ask_abort
from ..luks import Luks2
from ..models.device_model import (
@ -62,9 +61,7 @@ class FilesystemHandler:
# Setup the blockdevice, filesystem (and optionally encryption).
# Once that's done, we'll hand over to perform_installation()
partition_table = PartitionTable.GPT
if SysInfo.has_uefi() is False:
partition_table = PartitionTable.MBR
partition_table = PartitionTable.default()
# make sure all devices are unmounted
for mod in device_mods:

View File

@ -205,6 +205,10 @@ class PartitionTable(Enum):
def is_mbr(self) -> bool:
return self == PartitionTable.MBR
@classmethod
def default(cls) -> PartitionTable:
return cls.GPT if SysInfo.has_uefi() else cls.MBR
class Units(Enum):
BINARY = 'binary'