Change partition flag name Boot -> BOOT (#2903)

This commit is contained in:
codefiles 2024-11-20 20:22:50 -05:00 committed by GitHub
parent 7fd726f03f
commit bda0752eec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 9 additions and 9 deletions

View File

@ -590,7 +590,7 @@ class PartitionFlagDataMixin:
class PartitionFlag(PartitionFlagDataMixin, Enum):
Boot = parted.PARTITION_BOOT
BOOT = parted.PARTITION_BOOT
XBOOTLDR = parted.PARTITION_BLS_BOOT, "bls_boot"
ESP = parted.PARTITION_ESP
LINUX_HOME = parted.PARTITION_LINUX_HOME, "linux-home"
@ -713,8 +713,8 @@ class PartitionModification:
partuuid: str | None = None
uuid: str | None = None
_efi_indicator_flags = (PartitionFlag.Boot, PartitionFlag.ESP)
_boot_indicator_flags = (PartitionFlag.Boot, PartitionFlag.XBOOTLDR)
_efi_indicator_flags = (PartitionFlag.BOOT, PartitionFlag.ESP)
_boot_indicator_flags = (PartitionFlag.BOOT, PartitionFlag.XBOOTLDR)
def __post_init__(self) -> None:
# needed to use the object as a dictionary key due to hash func

View File

@ -116,13 +116,13 @@ class PartitioningList(ListManager):
case 'assign_mountpoint' if entry:
entry.mountpoint = self._prompt_mountpoint()
if entry.mountpoint == Path('/boot'):
entry.set_flag(PartitionFlag.Boot)
entry.set_flag(PartitionFlag.BOOT)
if SysInfo.has_uefi():
entry.set_flag(PartitionFlag.ESP)
case 'mark_formatting' if entry:
self._prompt_formatting(entry)
case 'mark_bootable' if entry:
entry.invert_flag(PartitionFlag.Boot)
entry.invert_flag(PartitionFlag.BOOT)
if SysInfo.has_uefi():
entry.invert_flag(PartitionFlag.ESP)
case 'set_filesystem' if entry:
@ -414,7 +414,7 @@ class PartitioningList(ListManager):
)
if partition.mountpoint == Path('/boot'):
partition.set_flag(PartitionFlag.Boot)
partition.set_flag(PartitionFlag.BOOT)
if SysInfo.has_uefi():
partition.set_flag(PartitionFlag.ESP)

View File

@ -203,7 +203,7 @@ def select_lvm_config(
def _boot_partition(sector_size: disk.SectorSize, using_gpt: bool) -> disk.PartitionModification:
flags = [disk.PartitionFlag.Boot]
flags = [disk.PartitionFlag.BOOT]
size = disk.Size(1, disk.Unit.GiB, sector_size)
if using_gpt:
start = disk.Size(1, disk.Unit.MiB, sector_size)

View File

@ -69,7 +69,7 @@ After running ``python -m archinstall test_installer`` it should print something
start=Size(value=2048, unit=<Unit.sectors: 'sectors'>, sector_size=SectorSize(value=512, unit=<Unit.B: 1>)),
length=Size(value=535822336, unit=<Unit.B: 1>, sector_size=SectorSize(value=512, unit=<Unit.B: 1>)),
flags=[
<PartitionFlag.Boot: flag_id=1, alias=None>,
<PartitionFlag.BOOT: flag_id=1, alias=None>,
<PartitionFlag.ESP: flag_id=18, alias=None>
],
partn=1,

View File

@ -24,7 +24,7 @@ boot_partition = disk.PartitionModification(
length=disk.Size(512, disk.Unit.MiB, device.device_info.sector_size),
mountpoint=Path('/boot'),
fs_type=disk.FilesystemType.Fat32,
flags=[disk.PartitionFlag.Boot]
flags=[disk.PartitionFlag.BOOT]
)
device_modification.add_partition(boot_partition)