diff options
author | Denys Dmytriyenko <denys@ti.com> | 2016-12-21 15:20:17 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-09 13:39:11 +0000 |
commit | a17171ad666e10c4ec7897eac6913d43c54c76bf (patch) | |
tree | 8e2865d7c82fe93c386317d325771c10b4e051a7 /meta | |
parent | cfa6a7aa6f08ae9ae395e4b1d2d506fbcf785bf6 (diff) | |
download | poky-a17171ad666e10c4ec7897eac6913d43c54c76bf.tar.gz |
linux-dtb: strip DTB extension properly in postinst/postrm
The use of awk -F "." in do_install/do_deploy to strip filename extension
was deprecated long time ago in 72980d5bb465f0640ed451d1ebb9c5d2a210ad0c.
Make a similar change in postinst/postrm to properly use basename command.
Otherwise DTB files that contain dots in the name result in broken symlinks
that point to non-existent truncated files.
(From OE-Core rev: 40c2addf0f0ee16b1c1334cf00f1490ffeaac475)
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-kernel/linux/linux-dtb.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/recipes-kernel/linux/linux-dtb.inc b/meta/recipes-kernel/linux/linux-dtb.inc index 668f6342b5..0e720934bb 100644 --- a/meta/recipes-kernel/linux/linux-dtb.inc +++ b/meta/recipes-kernel/linux/linux-dtb.inc | |||
@@ -68,7 +68,7 @@ pkg_postinst_kernel-devicetree () { | |||
68 | for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do | 68 | for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do |
69 | symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} | 69 | symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} |
70 | DTB_EXT=${DTB##*.} | 70 | DTB_EXT=${DTB##*.} |
71 | DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'` | 71 | DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` |
72 | DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` | 72 | DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` |
73 | update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} ${DTB_BASE_NAME}.${DTB_EXT} devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true | 73 | update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} ${DTB_BASE_NAME}.${DTB_EXT} devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true |
74 | done | 74 | done |
@@ -81,7 +81,7 @@ pkg_postrm_kernel-devicetree () { | |||
81 | for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do | 81 | for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do |
82 | symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} | 82 | symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME} |
83 | DTB_EXT=${DTB##*.} | 83 | DTB_EXT=${DTB##*.} |
84 | DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'` | 84 | DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` |
85 | DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` | 85 | DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"` |
86 | update-alternatives --remove ${DTB_BASE_NAME}.${DTB_EXT} devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true | 86 | update-alternatives --remove ${DTB_BASE_NAME}.${DTB_EXT} devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true |
87 | done | 87 | done |