From bda0752eec7eec476e712dbf873f415cf40363ae Mon Sep 17 00:00:00 2001 From: codefiles <11915375+codefiles@users.noreply.github.com> Date: Wed, 20 Nov 2024 20:22:50 -0500 Subject: [PATCH] Change partition flag name Boot -> BOOT (#2903) --- archinstall/lib/disk/device_model.py | 6 +++--- archinstall/lib/disk/partitioning_menu.py | 6 +++--- archinstall/lib/interactions/disk_conf.py | 2 +- docs/examples/python.rst | 2 +- examples/full_automated_installation.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py index 907bbfd680..9d5fb2c9cb 100644 --- a/archinstall/lib/disk/device_model.py +++ b/archinstall/lib/disk/device_model.py @@ -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 diff --git a/archinstall/lib/disk/partitioning_menu.py b/archinstall/lib/disk/partitioning_menu.py index 77e22bf422..9d4913c71c 100644 --- a/archinstall/lib/disk/partitioning_menu.py +++ b/archinstall/lib/disk/partitioning_menu.py @@ -116,13 +116,13 @@ def handle_action( 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 @@ def _create_new_partition(self) -> PartitionModification: ) if partition.mountpoint == Path('/boot'): - partition.set_flag(PartitionFlag.Boot) + partition.set_flag(PartitionFlag.BOOT) if SysInfo.has_uefi(): partition.set_flag(PartitionFlag.ESP) diff --git a/archinstall/lib/interactions/disk_conf.py b/archinstall/lib/interactions/disk_conf.py index f53e3059d2..70f16aa32d 100644 --- a/archinstall/lib/interactions/disk_conf.py +++ b/archinstall/lib/interactions/disk_conf.py @@ -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) diff --git a/docs/examples/python.rst b/docs/examples/python.rst index c0f27a5333..d9dcc21016 100644 --- a/docs/examples/python.rst +++ b/docs/examples/python.rst @@ -69,7 +69,7 @@ After running ``python -m archinstall test_installer`` it should print something start=Size(value=2048, unit=, sector_size=SectorSize(value=512, unit=)), length=Size(value=535822336, unit=, sector_size=SectorSize(value=512, unit=)), flags=[ - , + , ], partn=1, diff --git a/examples/full_automated_installation.py b/examples/full_automated_installation.py index 38619f9538..b54a44dee6 100644 --- a/examples/full_automated_installation.py +++ b/examples/full_automated_installation.py @@ -24,7 +24,7 @@ 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)