diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2024-03-21 12:44:09 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-23 10:18:20 +0000 |
commit | 084fe2241bf67047909032d7b7934479731910e6 (patch) | |
tree | 03e7712942314be505ddf16c23ceb02f716d0974 /meta/files | |
parent | 62c184ed61431177dcb97de79b36261147c66a37 (diff) | |
download | poky-084fe2241bf67047909032d7b7934479731910e6.tar.gz |
toolchain-shar-relocate.sh: Add check for missing command 'file'
On a machine without the file command, the SDK install fails with a
cryptic error message.
```
xargs: file: No such file or directory
sed: no input files
Failed to replace perl. Relocate script failed. Abort!
```
Add a test for 'file' to print a clear error message.
```
The command 'file' is required by the relocation script, please install it first. Abort!
```
(From OE-Core rev: 1aa19b9e34ebe6f39a25364073fed4c069f650e8)
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/files')
-rw-r--r-- | meta/files/toolchain-shar-relocate.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/files/toolchain-shar-relocate.sh b/meta/files/toolchain-shar-relocate.sh index e8ab357717..b017714df0 100644 --- a/meta/files/toolchain-shar-relocate.sh +++ b/meta/files/toolchain-shar-relocate.sh | |||
@@ -1,7 +1,9 @@ | |||
1 | if ! xargs --version > /dev/null 2>&1; then | 1 | for cmd in xargs file; do |
2 | echo "xargs is required by the relocation script, please install it first. Abort!" | 2 | if ! command -v $cmd > /dev/null 2>&1; then |
3 | exit 1 | 3 | echo "The command '$cmd' is required by the relocation script, please install it first. Abort!" |
4 | fi | 4 | exit 1 |
5 | fi | ||
6 | done | ||
5 | 7 | ||
6 | # fix dynamic loader paths in all ELF SDK binaries | 8 | # fix dynamic loader paths in all ELF SDK binaries |
7 | # allow symlinks to be accessed via the find command too | 9 | # allow symlinks to be accessed via the find command too |