disk: move ENC_IDENTIFIER (#3034)

This commit is contained in:
codefiles 2024-12-21 18:21:21 -05:00 committed by GitHub
parent 9b5fd6bad5
commit c978c841de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -24,6 +24,9 @@ if TYPE_CHECKING:
_: Callable[[str], DeferredTranslation]
ENC_IDENTIFIER = 'ainst'
class DiskLayoutType(Enum):
Default = 'default_layout'
Manual = 'manual_partitioning'
@ -919,7 +922,7 @@ class PartitionModification:
@property
def mapper_name(self) -> str | None:
if self.dev_path:
return f'{storage.get("ENC_IDENTIFIER", "ai")}{self.dev_path.name}'
return f'{ENC_IDENTIFIER}{self.dev_path.name}'
return None
def set_flag(self, flag: PartitionFlag) -> None:
@ -1076,7 +1079,7 @@ class LvmVolume:
@property
def mapper_name(self) -> str | None:
if self.dev_path:
return f'{storage.get("ENC_IDENTIFIER", "ai")}{self.safe_dev_path.name}'
return f'{ENC_IDENTIFIER}{self.safe_dev_path.name}'
return None
@property

View File

@ -13,5 +13,4 @@ storage: dict[str, Any] = {
'LOG_PATH': Path('/var/log/archinstall'),
'LOG_FILE': Path('install.log'),
'MOUNT_POINT': Path('/mnt/archinstall'),
'ENC_IDENTIFIER': 'ainst',
}