From: Jörg Sommer <[email protected]>
The commit “Use a copy of image for kernel*.rpm if fs doesn't support
symlinks” [1] added postinst and postrm scripts to the kernel package which
create a symlink after package installation. This should not happen if
`KERNEL_IMAGETYPE_SYMLINK` is not `1`.
Background: The u-boot implementation of jffs2 does not support symlinks.
Using a hardlink or removing `${KERNEL_VERSION}` from the file name fails,
because the current postinst script replaces the file with the symlink.
[1] 8b6b95106a5d4f1f6d34209ec5c475c900270ecd
Cc: Bruce Ashfield <[email protected]>
Cc: Richard Purdie <[email protected]>
Cc: Yanfei Xu <[email protected]>
Signed-off-by: Jörg Sommer <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
(cherry picked from commit 6a763401862d9ee96749ad18378b6344778c2c66)
Signed-off-by: Steve Sakoman <[email protected]>
---
meta/classes-recipe/kernel.bbclass | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/classes-recipe/kernel.bbclass
b/meta/classes-recipe/kernel.bbclass
index c0a2056fec..4c1cb89a46 100644
--- a/meta/classes-recipe/kernel.bbclass
+++ b/meta/classes-recipe/kernel.bbclass
@@ -115,7 +115,9 @@ 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.prependVar('pkg_postinst:%s-image-%s' % (kname,typelower), """set +e
+
+ if d.getVar('KERNEL_IMAGETYPE_SYMLINK') == '1':
+ 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
@@ -127,7 +129,7 @@ else
fi
set -e
""" % (type, type, type, type, type, type, type))
- d.setVar('pkg_postrm:%s-image-%s' % (kname,typelower), """set +e
+ d.setVar('pkg_postrm:%s-image-%s' % (kname,typelower), """set +e
if [ -f "${KERNEL_IMAGEDEST}/%s" -o -L "${KERNEL_IMAGEDEST}/%s" ]; then
rm -f ${KERNEL_IMAGEDEST}/%s > /dev/null 2>&1
fi
--
2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#202637):
https://lists.openembedded.org/g/openembedded-core/message/202637
Mute This Topic: https://lists.openembedded.org/mt/107608180/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-