ti-img-rogue-umlibs: harden handling of usrmerge
PATCH v2 1/1 ti-img-rogue-umlibs: harden handling of usrmerge
From: Max Krummenacher <[email protected]>
Only move directories which haven't already been moved.
This prevents a build error should a subsequent bitbake execution
rerun do_install where the sources to 'mv' no longer exist.
| mv: cannot stat 'ti-img-rogue-umlibs/23.1.6404501/git/targetfs/am62_linux/lws-generic/release/lib/firmware': No such file or directory
--- .../powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb +3 -1
@@ -68,7 +68,9 @@ do_install:prepend() { done fi if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then - mv ${S}/lib/firmware ${S}${nonarch_base_libdir} + if [ -e ${S}/lib/firmware ]; then + mv ${S}/lib/firmware ${S}${nonarch_base_libdir} + fi fi # clean up any empty directories
Signature · 1 line
2.35.3
Quoted 17 lines · Max Krummenacher
From: Max Krummenacher <[email protected]>
Only move directories which haven't already been moved.
This prevents a build error should a subsequent bitbake execution
rerundo_installwhere the sources to 'mv' no longer exist.
| mv: cannot stat 'ti-img-rogue-umlibs/23.1.6404501/git/targetfs/am62_linux/lws-generic/release/lib/firmware': No such file or directorySigned-off-by Max Krummenacher <[email protected]>--- .../powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb +0
-0
meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb do_install:prepend() { · line 73
Quoted 7 lines
meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb +3
-1@@ -68,7 +68,9 @@ do_install:prepend() { done fi if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then - mv ${S}/lib/firmware ${S}${nonarch_base_libdir} + if [ -e ${S}/lib/firmware ]; then + mv ${S}/lib/firmware ${S}${nonarch_base_libdir} + fi
Sorry it has taken so long to get back to this. Busy times over here.
I think the better plan is to not move the directory, but use some other command to copy the files. That way there should be no need to put a guard around the command. I'll work the Randoplh to get this updated the correct way.
Thank you for pointing out the issue.
Quoted 14 lines
meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb +0
-1fi # clean up any empty directories -=-=-=-=-=-=-=-=-=-=-=-Links: You receive all messages sent to this group.
View/Reply Online (#16922): https://lists.yoctoproject.org/g/meta-ti/message/16922
Mute This Topic: https://lists.yoctoproject.org/mt/101194647/6551054
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 32 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 19 lines · Max Krummenacher
From: Max Krummenacher <[email protected]>
Only move directories which haven't already been moved.
This prevents a build error should a subsequent bitbake execution
rerundo_installwhere the sources to 'mv' no longer exist.
| mv: cannot stat 'ti-img-rogue-umlibs/23.1.6404501/git/targetfs/am62_linux/lws-generic/release/lib/firmware': No such file or directorySigned-off-by Max Krummenacher <[email protected]>---
.../powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb | 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb +0
-1---a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb
+++
b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bbmeta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb +0
-0@@ -68,7 +68,9 @@ do_install:prepend() {Quoted 7 lines
done
fi
if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then - mv ${S}/lib/firmware ${S}${nonarch_base_libdir}
+ if [ -e ${S}/lib/firmware ]; then
+ mv ${S}/lib/firmware ${S}${nonarch_base_libdir}
+ fiSorry it has taken so long to get back to this. Busy times over here.
Quoted 3 lines
I think the better plan is to not move the directory, but use some other command to copy the files. That way there should be no need to put a guard around the command. I'll work the Randoplh to get this updated the correct way.
Thank you for pointing out the issue.
Spoke with Randolph and he agrees with you that this patch is good enough. I will apply it and test now.
Quoted 20 lines
Quoted 9 lines
fi
# clean up any empty directories-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17036): https://lists.yoctoproject.org/g/meta-ti/message/17036
Mute This Topic: https://lists.yoctoproject.org/mt/101194647/6551054
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/leave/10828724/6551054/1815494134/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Ryan Eatmon [email protected] ----------------------------------------- Texas Instruments, Inc. - LCPD - MGTS
Hi Ryan
Am Freitag, dem 29.09.2023 um 11:15 -0500 schrieb Ryan Eatmon:
Quoted 42 lines · Ryan Eatmon via lists.yoctoproject.org
Quoted 40 lines · Max Krummenacher
Quoted 21 lines
From: Max Krummenacher <[email protected]>
Only move directories which haven't already been moved. This prevents a build error should a subsequent bitbake execution rerun
do_installwhere the sources to 'mv' no longer exist.Quoted 1 line
mv: cannot stat
'ti-img-rogue-umlibs/23.1.6404501/git/targetfs/am62_linux/lws-generic/release/lib/firmware': No such file or directory
Signed-off-by Max Krummenacher <[email protected]>---
.../powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb | 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)(quoted diff) +0
-0a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb index
9b45a91f..2cf13c60100644
---
a/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb
+++
b/meta-ti-bsp/recipes-graphics/powervr-umlibs/ti-img-rogue-umlibs_23.1.6404501.bb(quoted diff) +0
-0@@ -68,7 +68,9 @@ do_install:prepend() {Quoted 8 lines
done
fi
if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'true', 'false', d)}; then
- mv ${S}/lib/firmware ${S}${nonarch_base_libdir} + if [ -e ${S}/lib/firmware ]; then
+ mv ${S}/lib/firmware ${S}${nonarch_base_libdir} + fiSorry it has taken so long to get back to this. Busy times over here.
I think the better plan is to not move the directory, but use some other command to copy the files. That way there should be no need to put a guard around the command. I'll work the Randoplh to get this updated the correct way.
Quoted 4 lines
Quoted 1 line
Thank you for pointing out the issue.
Spoke with Randolph and he agrees with you that this patch is good enough. I will apply it and test now.
When I did it I checked if mv has an option to not fail if the source does not exist and didn't find any.
I guess it is anyway a real corner case to be able to hit the issue. Thanks for pulling it in.
Regards
Max
Quoted 24 lines
Quoted 23 lines
Quoted 5 lines
Quoted 7 lines
fi
# clean up any empty directories-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#17036): https://lists.yoctoproject.org/g/meta-ti/message/17036
Mute This Topic: https://lists.yoctoproject.org/mt/101194647/6551054
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/leave/10828724/6551054/1815494134/xyzzy [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-