From 42a4176a9f2fae92f8df03dd177f0581888bea92 Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Thu, 9 Jan 2020 15:45:20 +0100 Subject: [PATCH] stages/grub2: fix auto bool to platform conversion In the case that legacy is of type bool it is automatically converted to the platform string ("i386-legacy"). This is mainly done to keep backwards comparability as it was just a boolean before. But the auto conversion did not take the actual *value* of the boolean into account meaning "legacy: False" would be turned into "legacy: i386-pc" and thus effectively changing the value from False to True. --- stages/org.osbuild.grub2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stages/org.osbuild.grub2 b/stages/org.osbuild.grub2 index 4197fff2..2a3b57f7 100755 --- a/stages/org.osbuild.grub2 +++ b/stages/org.osbuild.grub2 @@ -117,7 +117,7 @@ def main(tree, options): uefi = options.get("uefi", None) # legacy boolean means the - if isinstance(legacy, bool): + if isinstance(legacy, bool) and legacy: legacy = "i386-pc" # Create the configuration file that determines how grub.cfg is generated.