common: Do not warn on listing the nonexistent files

The subshell was printing the error backtrace, but apparently it was
of no consequences. Just assume that listing may fail, so we don't get
any confusing backtraces.
This commit is contained in:
Krzesimir Nowak 2021-09-28 16:35:18 +02:00
parent d801ecccdf
commit caa74dfaf8

View File

@ -979,8 +979,8 @@ fixup_liblto_softlinks() {
local link local link
local target local target
# check both native (/usr/CHOST/) as well as cross compile (/usr/CHOST/CTARGET) paths # check both native (/usr/CHOST/) as well as cross compile (/usr/CHOST/CTARGET) paths
{ ls -l "${root}/"usr/*/binutils-bin/lib/bfd-plugins/liblto_plugin.so 2>/dev/null; { ls -l "${root}/"usr/*/binutils-bin/lib/bfd-plugins/liblto_plugin.so 2>/dev/null || :;
ls -l "${root}/"usr/*/*/binutils-bin/lib/bfd-plugins/liblto_plugin.so 2>/dev/null; } \ ls -l "${root}/"usr/*/*/binutils-bin/lib/bfd-plugins/liblto_plugin.so 2>/dev/null || :; } \
| sed 's:.* \([^[:space:]]\+\) -> \([^[:space:]]\+\):\1 \2:' \ | sed 's:.* \([^[:space:]]\+\) -> \([^[:space:]]\+\):\1 \2:' \
| while read link target; do | while read link target; do
local newtarget=$(echo "$target" | sed "s:${root}:/:") local newtarget=$(echo "$target" | sed "s:${root}:/:")