diff mbox series

[isar-cip-core] swupdate.inc: Remove unnecessary defaults from getVar

Message ID 20211112110712.160124-1-Quirin.Gylstorff@siemens.com (mailing list archive)
State Handled Elsewhere
Headers show
Series [isar-cip-core] swupdate.inc: Remove unnecessary defaults from getVar | expand

Commit Message

Gylstorff Quirin Nov. 12, 2021, 11:07 a.m. UTC
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

Also 'TRUE' is not a valid value.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 recipes-core/swupdate/swupdate.inc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Jan Kiszka Nov. 12, 2021, 11:27 a.m. UTC | #1
On 12.11.21 12:07, Q. Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> Also 'TRUE' is not a valid value.
> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
>  recipes-core/swupdate/swupdate.inc | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/recipes-core/swupdate/swupdate.inc b/recipes-core/swupdate/swupdate.inc
> index 191aa2b..7812ae7 100644
> --- a/recipes-core/swupdate/swupdate.inc
> +++ b/recipes-core/swupdate/swupdate.inc
> @@ -26,12 +26,12 @@ def get_bootloader_build_profile(d):
>  SWUPDATE_BUILD_PROFILES += "${@get_bootloader_build_profile(d)}"
>  
>  def get_bootloader_dependencies(d):
> -    bootloader = d.getVar("SWUPDATE_BOOTLOADER", True) or ""
> +    bootloader = d.getVar("SWUPDATE_BOOTLOADER") or ""
>      if bootloader == "efibootguard":
>          return "efibootguard-dev"
>      if bootloader == "u-boot":
> -        if d.getVar("U_BOOT_CONFIG_PACKAGE", True) == "1":
> -            return "libubootenv u-boot-{}-config".format(d.getVar("MACHINE", TRUE))
> +        if d.getVar("U_BOOT_CONFIG_PACKAGE") == "1":
> +            return "libubootenv u-boot-{}-config".format(d.getVar("MACHINE"))
>          else:
>              return "libubootenv"
>      return ""
> @@ -48,7 +48,7 @@ dpkg_runbuild_prepend() {
>  }
>  
>  python do_check_bootloader () {
> -    bootloader = d.getVar("SWUPDATE_BOOTLOADER", True) or "None"
> +    bootloader = d.getVar("SWUPDATE_BOOTLOADER") or "None"
>      if not bootloader in ["efibootguard", "u-boot"]:
>          bb.warn("swupdate: SWUPDATE_BOOTLOADER set to incompatible value: " + bootloader)
>  }
> 

Thanks, applied.

Jan
diff mbox series

Patch

diff --git a/recipes-core/swupdate/swupdate.inc b/recipes-core/swupdate/swupdate.inc
index 191aa2b..7812ae7 100644
--- a/recipes-core/swupdate/swupdate.inc
+++ b/recipes-core/swupdate/swupdate.inc
@@ -26,12 +26,12 @@  def get_bootloader_build_profile(d):
 SWUPDATE_BUILD_PROFILES += "${@get_bootloader_build_profile(d)}"
 
 def get_bootloader_dependencies(d):
-    bootloader = d.getVar("SWUPDATE_BOOTLOADER", True) or ""
+    bootloader = d.getVar("SWUPDATE_BOOTLOADER") or ""
     if bootloader == "efibootguard":
         return "efibootguard-dev"
     if bootloader == "u-boot":
-        if d.getVar("U_BOOT_CONFIG_PACKAGE", True) == "1":
-            return "libubootenv u-boot-{}-config".format(d.getVar("MACHINE", TRUE))
+        if d.getVar("U_BOOT_CONFIG_PACKAGE") == "1":
+            return "libubootenv u-boot-{}-config".format(d.getVar("MACHINE"))
         else:
             return "libubootenv"
     return ""
@@ -48,7 +48,7 @@  dpkg_runbuild_prepend() {
 }
 
 python do_check_bootloader () {
-    bootloader = d.getVar("SWUPDATE_BOOTLOADER", True) or "None"
+    bootloader = d.getVar("SWUPDATE_BOOTLOADER") or "None"
     if not bootloader in ["efibootguard", "u-boot"]:
         bb.warn("swupdate: SWUPDATE_BOOTLOADER set to incompatible value: " + bootloader)
 }