linux-dtb: strip DTB extension properly in postinst/postrm
PATCH 1/1 linux-dtb: strip DTB extension properly in postinst/postrm
From: Denys Dmytriyenko <[email protected]>
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)
--- meta/recipes-kernel/linux/linux-dtb.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-kernel/linux/linux-dtb.inc +2 -2
@@ -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
Signature · 1 line
2.7.4
Ping
Quoted 50 lines · Denys Dmytriyenko
From: Denys Dmytriyenko <[email protected]>
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 <[email protected]>Signed-off-by Ross Burton <[email protected]>(From OE-Core rev:
40c2addf0f0ee16b1c1334cf00f1490ffeaac475)Signed-off-by Denys Dmytriyenko <[email protected]>--- meta/recipes-kernel/linux/linux-dtb.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/recipes-kernel/linux/linux-dtb.inc +2
-2@@ -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 doneSignature · 7 lines
2.7.4 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
Quoted 1 line · Denys Dmytriyenko
Ping
in staging
- armin
Quoted 52 lines · Denys Dmytriyenko
Quoted 50 lines
From: Denys Dmytriyenko <[email protected]>
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 <[email protected]>Signed-off-by Ross Burton <[email protected]>(From OE-Core rev:
40c2addf0f0ee16b1c1334cf00f1490ffeaac475)Signed-off-by Denys Dmytriyenko <[email protected]>--- meta/recipes-kernel/linux/linux-dtb.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/recipes-kernel/linux/linux-dtb.inc +2
-2@@ -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 doneSignature · 7 lines
2.7.4 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core