Workaround for do_populate_sysroot failure
cover Workaround for do_populate_sysroot failure
From: Kai Kang <[email protected]>
Hi,
The script caused the issue install-sh is identical with the file from libtool and automake. Its function should be stable. And I didn't find out the root cause, so remove the temporary files explictly as workaround.
Kai Kang (1):
adwaita-icon-theme: workaround for do_populate_sysroot failure
meta/recipes-gnome/gnome/adwaita-icon-theme_3.32.0.bb | 5 +++++ 1 file changed, 5 insertions(+)
Signature · 1 line
2.20.0
PATCH 1/1 adwaita-icon-theme: workaround for do_populate_sysroot failure
From: Kai Kang <[email protected]>
It fails to run task do_populate_sysroot of adwaita-icon-theme rarely:
| DEBUG: Executing shell function sysroot_stage_all
| cpio: ./icons/Adwaita/16x16/legacy/_inst.21134_: Cannot stat: No such
file or directory
In script ${S}/install-sh, temporary files _inst.* are created and will be removed by shell builtin command trap when the script exits:
# Make a couple of temp file names in the proper directory.
dsttmp=${dstdirslash}_inst.$$_
rmtmp=${dstdirslash}_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0The temporary files should be deleted already after task do_install. But somehow they are still exist until the gap between commands find and cpio in populate_sysroot function sysroot_stage_dir().
Remove the temporary files explicitly to avoid such issues.
--- meta/recipes-gnome/gnome/adwaita-icon-theme_3.32.0.bb | 5 +++++ 1 file changed, 5 insertions(+)
meta/recipes-gnome/gnome/adwaita-icon-theme_3.32.0.bb +5 -0
@@ -19,6 +19,11 @@ SRC_URI[sha256sum] = "698db6e407bb987baec736c6a30216dfc0317e3ca2403c7adf3a5aa46c DEPENDS += "librsvg-native" +do_install_append () { + # remove temp files explicitly + find ${D} \( -name _inst.* -o -name _rm.* \) -delete +} + PACKAGES = "${PN}-cursors ${PN}-symbolic-hires ${PN}-symbolic ${PN}-hires ${PN}" RREPLACES_${PN} = "gnome-icon-theme"
Signature · 1 line
2.20.0
Re: [PATCH 1/1] adwaita-icon-theme: workaround for do_populate_sysroot failure
Quoted 18 lines · On 20/08/2019 10:05, [email protected] wrote:
From: Kai Kang <[email protected]>
It fails to run task
do_populate_sysrootof adwaita-icon-theme rarely:| DEBUG: Executing shell function
sysroot_stage_all
| cpio: ./icons/Adwaita/16x16/legacy/_inst.21134_: Cannot stat: No such
file or directoryIn script ${S}/install-sh, temporary files _inst.* are created and will be removed by shell builtin command trap when the script exits:
# Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
Quoted 3 lines
The temporary files should be deleted already after task
do_install. But somehow they are still exist until the gap between commands find and cpio inpopulate_sysrootfunctionsysroot_stage_dir().
So does this only happen to adwaita-icon-theme? Is it a bug in install-sh, so impacts almost every automake-using package? Or is it a bug in how adwaita-icon-theme is using install-sh?
Ross
Re: [PATCH 1/1] adwaita-icon-theme: workaround for do_populate_sysroot failure
Quoted 17 lines · Ross Burton
Quoted 7 lines
It fails to run task
do_populate_sysrootof adwaita-icon-theme rarely:| DEBUG: Executing shell function
sysroot_stage_all
| cpio: ./icons/Adwaita/16x16/legacy/_inst.21134_: Cannot stat: No such
file or directoryIn script ${S}/install-sh, temporary files _inst.* are created and will
be
Quoted 9 lines
removed by shell builtin command trap when the script exits:
# Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
Quoted 8 lines
Quoted 3 lines
The temporary files should be deleted already after task
do_install. But somehow they are still exist until the gap between commands find and cpio inpopulate_sysrootfunctionsysroot_stage_dir().So does this only happen to adwaita-icon-theme? Is it a bug in install-sh, so impacts almost every automake-using package? Or is it a bug in how adwaita-icon-theme is using install-sh?
This might actually be caused by my glorious hack:
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch?h=master-next
There is a 'wait' after every '&', so not sure what goes wrong here.
Alex
Re: [PATCH 1/1] adwaita-icon-theme: workaround for do_populate_sysroot failure
Quoted 32 lines · Alexander Kanavin
Quoted 1 line · On Tue, 20 Aug 2019 at 20:42, Ross Burton <[email protected]…
It fails to run task
do_populate_sysrootof adwaita-icon-themerarely:
>
> | DEBUG: Executing shell functionsysroot_stage_all
> | cpio: ./icons/Adwaita/16x16/legacy/_inst.21134_: Cannot stat:
No such
> file or directory
>
> In script ${S}/install-sh, temporary files _inst.* are created and will be
> removed by shell builtin command trap when the script exits:
>
> # Make a couple of temp file names in the proper directory. > dsttmp=${dstdirslash}_inst.$$_
> rmtmp=${dstdirslash}_rm.$$_
>
> # Trap to clean up those temp files at exit.
> trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 >
> The temporary files should be deleted already after taskdo_install. But
> somehow they are still exist until the gap between commands find and > cpio inpopulate_sysrootfunctionsysroot_stage_dir().So does this only happen to adwaita-icon-theme? Is it a bug in install-sh, so impacts almost every automake-using package? Or is it a
bug in how adwaita-icon-theme is using install-sh?
Quoted 4 lines
This might actually be caused by my glorious hack:
https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch?h=master-nextThere is a 'wait' after every '&', so not sure what goes wrong here.
Hi Alex,
Thanks. I'll revert this commit locally. And if it is the root cause, I'll try to figure out what's going on here.
Kai
Quoted 3 lines
Alex
Signature · 1 line
Kai Kang