Merge pull request #2058 from dalto8/doublesubvol

[mount] Remove duplicate subvol option
This commit is contained in:
demmm 2022-10-18 20:38:56 +02:00 committed by GitHub
commit 6fd1c90f23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -294,13 +294,13 @@ def mount_partition(root_mount_point, partition, partitions, mount_options, moun
# Mount the subvolumes # Mount the subvolumes
swap_subvol = libcalamares.job.configuration.get("btrfsSwapSubvol", "/@swap") swap_subvol = libcalamares.job.configuration.get("btrfsSwapSubvol", "/@swap")
for s in btrfs_subvolumes: for s in btrfs_subvolumes:
mount_option = "subvol={}".format(s['subvolume'])
if s['subvolume'] == swap_subvol: if s['subvolume'] == swap_subvol:
mount_option += "," + get_mount_options("btrfs_swap", mount_options, partition) mount_option_no_subvol = get_mount_options("btrfs_swap", mount_options, partition)
else: else:
mount_option += "," + get_mount_options(fstype, mount_options, partition) mount_option_no_subvol = get_mount_options(fstype, mount_options, partition)
mount_option = f"subvol={s['subvolume']},{mount_option_no_subvol}"
subvolume_mountpoint = mount_point[:-1] + s['mountPoint'] subvolume_mountpoint = mount_point[:-1] + s['mountPoint']
mount_options_list.append({"mountpoint": s['mountPoint'], "option_string": mount_option}) mount_options_list.append({"mountpoint": s['mountPoint'], "option_string": mount_option_no_subvol})
if libcalamares.utils.mount(device, if libcalamares.utils.mount(device,
subvolume_mountpoint, subvolume_mountpoint,
fstype, fstype,