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

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.

(From OE-Core rev: 579906b9f4ea32c8d4e0e11a87ee6c9e27cdf0dc)

Signed-off-by: Raphael Teller <raphael.teller@se.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Raphael Teller
2022-05-23 10:10:44 +02:00
committed by Richard Purdie
parent e7b13beb49
commit 7b7dbdd48b

View File

@@ -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