[merge] with upstream

This commit is contained in:
Philip Müller 2020-02-24 19:44:30 +01:00
commit cdbd9eb8eb

View File

@ -74,6 +74,12 @@ def modify_grub_default(partitions, root_mount_point, distributor):
swap_uuid = "" swap_uuid = ""
swap_outer_uuid = "" swap_outer_uuid = ""
swap_outer_mappername = None swap_outer_mappername = None
no_save_default = False
for partition in partitions:
if partition["mountPoint"] in ("/", "/boot") and partition["fs"] in ("btrfs", "f2fs"):
no_save_default = True
break
if have_plymouth: if have_plymouth:
use_splash = "splash" use_splash = "splash"
@ -198,6 +204,9 @@ def modify_grub_default(partitions, root_mount_point, distributor):
# We're not updating because of *keepDistributor*, but if # We're not updating because of *keepDistributor*, but if
# this was a comment line, then it's still not been set. # this was a comment line, then it's still not been set.
have_distributor_line = have_distributor_line or not lines[i].startswith("#") have_distributor_line = have_distributor_line or not lines[i].startswith("#")
# If btrfs or f2fs is used, don't save default
if no_save_default and lines[i].startswith("GRUB_SAVEDEFAULT="):
lines[i] = "#GRUB_SAVEDEFAULT=\"true\""
else: else:
lines = [] lines = []