Skip to contentSkip to conversation

kernel.bbclass: Do not overwrite recipe's custom postinst

PATCH New Raphael Teller 1 participant 1 message May 23, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel.bbclass: Do not overwrite recipe's custom postinst

From: Raphael Teller <[email protected]>

Allow recipe to set a custom postinst for kernel image. Use prependVar in order to allow custom postinst to be ran after default postinst, potentially modifying the installed file/symlink.

---
 meta/classes/kernel.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/kernel.bbclass +1 -1
index 83785c3b5b..5d2f17c3be 100644
@@ -110,7 +110,7 @@ python __anonymous () {
 
         d.setVar('PKG:%s-image-%s' % (kname,typelower), '%s-image-%s-${KERNEL_VERSION_PKG_NAME}' % (kname, typelower))
         d.setVar('ALLOW_EMPTY:%s-image-%s' % (kname, typelower), '1')
-        d.setVar('pkg_postinst:%s-image-%s' % (kname,typelower), """set +e
+        d.prependVar('pkg_postinst:%s-image-%s' % (kname,typelower), """set +e
 if [ -n "$D" ]; then
     ln -sf %s-${KERNEL_VERSION} $D/${KERNEL_IMAGEDEST}/%s > /dev/null 2>&1
 else
Signature · 1 line
2.17.1