Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorcodefiles <11915375+codefiles@users.noreply.github.com>2023-10-02 01:50:20 -0400
committerGitHub <noreply@github.com>2023-10-02 07:50:20 +0200
commit8257e9f73f6d8f233731b5632863a5d7a4ae827e (patch)
tree1d53dc1174e8e8519619c668b50ea9db76b28658 /archinstall
parent71048721ecc7b06b227080688bbf02950ffc1942 (diff)
Fix missing info for pre-mounted disk configuration (#2143)
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/disk/device_handler.py9
-rw-r--r--archinstall/lib/disk/device_model.py9
2 files changed, 17 insertions, 1 deletions
diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py
index f2835b7b..6927671d 100644
--- a/archinstall/lib/disk/device_handler.py
+++ b/archinstall/lib/disk/device_handler.py
@@ -83,7 +83,9 @@ class DeviceHandler(object):
_PartitionInfo.from_partition(
partition,
fs_type,
+ lsblk_info.partn,
lsblk_info.partuuid,
+ lsblk_info.uuid,
lsblk_info.mountpoints,
subvol_infos
)
@@ -598,7 +600,12 @@ class DeviceHandler(object):
path = Path(part_info.disk.device.path)
part_mods.setdefault(path, [])
part_mod = PartitionModification.from_existing_partition(part_info)
- part_mod.mountpoint = mountpoint.root / mountpoint.relative_to(base_mountpoint)
+ if part_mod.mountpoint:
+ part_mod.mountpoint = mountpoint.root / mountpoint.relative_to(base_mountpoint)
+ else:
+ for subvol in part_mod.btrfs_subvols:
+ if sm := subvol.mountpoint:
+ subvol.mountpoint = sm.root / sm.relative_to(base_mountpoint)
part_mods[path].append(part_mod)
break
diff --git a/archinstall/lib/disk/device_model.py b/archinstall/lib/disk/device_model.py
index 6992bccb..26169485 100644
--- a/archinstall/lib/disk/device_model.py
+++ b/archinstall/lib/disk/device_model.py
@@ -308,7 +308,9 @@ class _PartitionInfo:
start: Size
length: Size
flags: List[PartitionFlag]
+ partn: int
partuuid: str
+ uuid: str
disk: Disk
mountpoints: List[Path]
btrfs_subvol_infos: List[_BtrfsSubvolumeInfo] = field(default_factory=list)
@@ -342,7 +344,9 @@ class _PartitionInfo:
cls,
partition: Partition,
fs_type: Optional[FilesystemType],
+ partn: int,
partuuid: str,
+ uuid: str,
mountpoints: List[Path],
btrfs_subvol_infos: List[_BtrfsSubvolumeInfo] = []
) -> _PartitionInfo:
@@ -370,7 +374,9 @@ class _PartitionInfo:
start=start,
length=length,
flags=flags,
+ partn=partn,
partuuid=partuuid,
+ uuid=uuid,
disk=partition.disk,
mountpoints=mountpoints,
btrfs_subvol_infos=btrfs_subvol_infos
@@ -713,6 +719,9 @@ class PartitionModification:
length=partition_info.length,
fs_type=partition_info.fs_type,
dev_path=partition_info.path,
+ partn=partition_info.partn,
+ partuuid=partition_info.partuuid,
+ uuid=partition_info.uuid,
flags=partition_info.flags,
mountpoint=mountpoint,
btrfs_subvols=subvol_mods