Fix unpackfs wrongly excluding separately-mounted partitions.
mount: Remember the extraMounts (and extraMountsEfi, if applicable) in the global storage (as "extraMounts"). unpackfs: Read the extra mounts from the global storage to generate the exclude list instead of trying to detect it from the "mount" command's output, because the latter also includes normally-mounted destination partitions. This makes having separate partitions for non-/ mountpoints work again.
This commit is contained in:
parent
20e6cd4ab0
commit
e6d65d047b
@ -55,9 +55,16 @@ def run():
|
||||
mount_partitions(root_mount_point, partitions)
|
||||
|
||||
mount_partitions(root_mount_point, extra_mounts)
|
||||
|
||||
if(os.path.exists("/sys/firmware/efi/efivars")):
|
||||
|
||||
fw_type = libcalamares.globalstorage.value("firmwareType")
|
||||
if fw_type == 'efi':
|
||||
mount_partitions(root_mount_point, extra_mounts_efi)
|
||||
|
||||
libcalamares.globalstorage.insert("rootMountPoint", root_mount_point)
|
||||
# Remember the extra mounts for the unpackfs module
|
||||
if fw_type == 'efi':
|
||||
libcalamares.globalstorage.insert("extraMounts", extra_mounts + extra_mounts_efi)
|
||||
else:
|
||||
libcalamares.globalstorage.insert("extraMounts", extra_mounts)
|
||||
|
||||
return None
|
||||
|
@ -43,16 +43,11 @@ ON_POSIX = 'posix' in sys.builtin_module_names
|
||||
|
||||
|
||||
def list_excludes(destination):
|
||||
prefix = destination.replace('//', '/')
|
||||
if not prefix.endswith('/'):
|
||||
prefix = prefix + '/'
|
||||
lst = []
|
||||
for line in open('/etc/mtab').readlines():
|
||||
device, mount_point, _ = line.split(" ", 2)
|
||||
if mount_point.startswith(prefix):
|
||||
# -1 to include the leading / from the end of the prefix
|
||||
# also add a trailing /
|
||||
lst.extend(['--exclude', mount_point[len(prefix)-1:] + '/'])
|
||||
extra_mounts = globalstorage.value("extraMounts")
|
||||
for extra_mount in extra_mounts:
|
||||
mount_point = extra_mount["mountPoint"]
|
||||
if mount_point:
|
||||
lst.extend(['--exclude', mount_point + '/'])
|
||||
return lst
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user