All of lore.kernel.org
 help / color / mirror / Atom feed
* [isar-cip-core][PATCH] swupdate-handler-roundrobin: Silence fetcher warnings with different SWUPDATE_BOOTLOADER
@ 2024-04-10 21:32 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2024-04-10 21:32 UTC (permalink / raw)
  To: cip-dev; +Cc: Quirin Gylstorff

From: Jan Kiszka <jan.kiszka@siemens.com>

If SWUPDATE_BOOTLOADER is set to something else than efibootguard, e.g.
u-boot, we get warnings like this:

Unable to get checksum for swupdate-handler-roundrobin SRC_URI entry swupdate.handler.u-boot.ini: file could not be found

Our recipe only supports efibootguard, and downstream layers may not
even use it when a different bootloader is used. If downstream actually
wants to use out recipe and also provide some own swupdate.handler.ini,
it should rather override SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 .../swupdate-handler-roundrobin_0.1.bb                    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/recipes-core/swupdate-handler-roundrobin/swupdate-handler-roundrobin_0.1.bb b/recipes-core/swupdate-handler-roundrobin/swupdate-handler-roundrobin_0.1.bb
index 70ba522b..a185f253 100644
--- a/recipes-core/swupdate-handler-roundrobin/swupdate-handler-roundrobin_0.1.bb
+++ b/recipes-core/swupdate-handler-roundrobin/swupdate-handler-roundrobin_0.1.bb
@@ -17,8 +17,8 @@ SRCREV_swupdate-handler-roundrobin ?= "e6936b8c29a20cb6a6893faae57e12499ebbc342"
 
 SWUPDATE_LUASCRIPT = "swupdate-handler-roundrobin/swupdate_handlers_roundrobin.lua"
 
-SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG ?= "swupdate.handler.${SWUPDATE_BOOTLOADER}.ini"
-SRC_URI += "${@('file://' + d.getVar('SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG')) if d.getVar('SWUPDATE_BOOTLOADER') else ''}"
+SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG ?= "${@ 'swupdate.handler.efibootguard.ini' if d.getVar('SWUPDATE_BOOTLOADER') == 'efibootguard' else ''}"
+SRC_URI += "${@('file://' + d.getVar('SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG')) if d.getVar('SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG') else ''}"
 
 # The lua version used by swupdate to search for additional handler is hard coded in debian/rules
 # see https://salsa.debian.org/debian/swupdate/-/blob/6ccd44a8539ebb880bf0dac408d5db5de7e2de99/debian/rules#L13
@@ -37,7 +37,7 @@ do_install() {
     if [ -e ${WORKDIR}/${SWUPDATE_LUASCRIPT} ]; then
         install -m 0644 ${WORKDIR}/${SWUPDATE_LUASCRIPT} ${D}/usr/share/lua/${SWUPDATE_LUA_VERSION}/swupdate_handlers.lua
     fi
-    if [ -e ${WORKDIR}/${SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG} ]; then
-       install -m 0644 ${WORKDIR}/${SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG} ${D}/etc/swupdate.handler.ini
+    if [ -n "${SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG}" ] && [ -e ${WORKDIR}/${SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG} ]; then
+        install -m 0644 ${WORKDIR}/${SWUPDATE_ROUND_ROBIN_HANDLER_CONFIG} ${D}/etc/swupdate.handler.ini
     fi
 }
-- 
2.35.3


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-10 21:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-10 21:32 [isar-cip-core][PATCH] swupdate-handler-roundrobin: Silence fetcher warnings with different SWUPDATE_BOOTLOADER Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.