aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2017-01-10 18:11:39 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-02-03 09:51:18 +0000
commited0f9cf63cb1226f9d92377e13ef63e36a95d29d (patch)
tree241d3518c05ca543a7c1ccf06923b256fdab629d
parent02a0dd90c3f3b1fc6ebddc17feb824d11848b2a7 (diff)
downloadopenembedded-core-contrib-ed0f9cf63cb1226f9d92377e13ef63e36a95d29d.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. Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Ross Burton <ross.burton@intel.com> (From OE-Core rev: 40c2addf0f0ee16b1c1334cf00f1490ffeaac475) Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta/recipes-kernel/linux/linux-dtb.inc4
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 8528d646dd..2f378a1db0 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 () {
for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
DTB_EXT=${DTB##*.}
- DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
+ DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
update-alternatives --install /${KERNEL_IMAGEDEST}/${DTB_BASE_NAME}.${DTB_EXT} ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
done
@@ -81,7 +81,7 @@ pkg_postrm_kernel-devicetree () {
for type in ${KERNEL_IMAGETYPE_FOR_MAKE}; do
symlink_name=${type}"-"${KERNEL_IMAGE_SYMLINK_NAME}
DTB_EXT=${DTB##*.}
- DTB_BASE_NAME=`basename ${DTB} | awk -F "." '{print $1}'`
+ DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"`
DTB_SYMLINK_NAME=`echo ${symlink_name} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
update-alternatives --remove ${DTB_BASE_NAME}.${DTB_EXT} /boot/devicetree-${DTB_SYMLINK_NAME}.${DTB_EXT} ${KERNEL_PRIORITY} || true
done