Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib')
-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