I don't have a very complete understanding of yocto and its build systems, so hopefully I haven't missed anything obvious. I'm trying to install an SDK I have created in a docker container but noticed that certain errors weren't properly dealt with by the installer. I was missing the bzip2 dependency and tried to install and got this: ``` You are about to install the SDK to "/home/user/sdk". Proceed[Y/n]? Y Extracting SDK...tar (grandchild): bzip2: Cannot exec: No such file or directory tar (grandchild): Error is not recoverable: exiting now tar: Child died with signal 13 tar: Error is not recoverable: exiting now done Setting it up...ls: cannot access '/home/user/sdk/environment-setup-*': No such file or directory mv: cannot move '/tmp/tmp.J2J4wgh7z1/relocate_sdk.sh' to '/relocate_sdk.sh': Permission denied chmod: cannot access '/relocate_sdk.sh': No such file or directory ./toolchain.sh: 208: ./toolchain.sh: /relocate_sdk.sh: not found SDK could not be set up. Relocate script failed. Abort! ``` Notice how it does not notice the error of a missing bzip2 executable but fails later when files are missing. After I installed bzip and python (two other dependencies that I had missing), I got the following issue (because I was missing the file binary): ``` You are about to install the SDK to "/home/user/sdk". Proceed[Y/n]? Y Extracting SDK..........................................done Setting it up...xargs: file: No such file or directory sed: no input files done SDK has been successfully set up and is ready to be used. Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. $ . /home/user/sdk/environment-setup-cortexa8hf-vfp-neon-poky-linux-gnueabi ``` Notice how it doesn't detect the issue and considers the installation to be successful, despite a big red warning. The issue is in the toolchain-shar-relocate.sh script: http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/files/toolchain-shar-relocate.sh#n48 I see no error-handling in this file whatsoever, perhaps setting the pipefail ( https://www.gnu.org/software/bash/manual/html_node/Pipelines.html ) can be a solution? Regards Linus
Moving to M4 due to time constraints.
Sent patch to the mailing list: http://lists.openembedded.org/pipermail/openembedded-core/2016-September/126761.html
This has been solved in commits: http://git.openembedded.org/openembedded-core/commit/meta/files/toolchain-shar-relocate.sh?id=c9982dab4cfdd5963d2c2dd4aab99dd6a27fcd1c http://git.openembedded.org/openembedded-core/commit/meta/files/toolchain-shar-relocate.sh?id=8d6ee36493800a30e9bd6eacb671fbafe5d61ad7
While I haven't been able to test this yet, it does not seem that your patch addresses the issues of missing dependencies, specifically bzip2 and python. Have you left that out on purpose?
(In reply to comment #4) > While I haven't been able to test this yet, it does not seem that your patch > addresses the issues of missing dependencies, specifically bzip2 and python. > Have you left that out on purpose? bzip2 has been replaced long ago in commit 193086137b899a0a4e774ffc337ed0da9947fd4f python is checked in relocation script when calling the dynamic generated script. The only thing that I did on that was to change the shebang from bash to sh.