balena-os / meta-balena

A collection of Yocto layers used to build balenaOS images
https://www.balena.io/os
968 stars 115 forks source link

hostapp-update-hooks: Soft include balena-config-defaults #3379

Closed mtoman closed 5 months ago

mtoman commented 5 months ago

a203bcdfd567c0cc4b4ed9de493513142cd7463f introduced a dependency on /usr/sbin/balena-config-defaults to hostapp-update-hooks, however during HUP the script is not only executed in the "new" OS container but directly in the context of the "old" OS as well, so /usr/sbin/balena-config-defaults needs to exist there. The file was introduced in balenaOS v2.99.28, so trying to HUP from anything before that will fail.

This patch changes this to a soft dependency so even if the file is missing HUP will continue.


Contributor checklist

Reviewer Guidelines

mtoman commented 5 months ago

@resin-jenkins retest this please

mtoman commented 5 months ago

Still complains about /usr/libexec/os-helpers-sb: line 24: user_mode_enabled: command not found in multiple places but does not fail on it & the update goes through.

mtoman commented 5 months ago

Added an extra if to get rid of the user_mode_enabled: command not found error