summaryrefslogtreecommitdiffstats
path: root/build/linux/sysroot_ld_path.sh
diff options
context:
space:
mode:
authorsl.ostapenko@samsung.com <sl.ostapenko@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-29 21:51:23 +0000
committersl.ostapenko@samsung.com <sl.ostapenko@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-29 21:51:23 +0000
commite7c910d77b023f2fc7d72dd8f9b26fed568a7f04 (patch)
tree7b6f3e34dfd376083691150b9fcf02477a7f0d80 /build/linux/sysroot_ld_path.sh
parent44fb9dc282d8d80d8362e5efc241c1cbaeb3d5cc (diff)
downloadchromium_src-e7c910d77b023f2fc7d72dd8f9b26fed568a7f04.zip
chromium_src-e7c910d77b023f2fc7d72dd8f9b26fed568a7f04.tar.gz
chromium_src-e7c910d77b023f2fc7d72dd8f9b26fed568a7f04.tar.bz2
Fix "No such file or directory" error in sysroot_ld_path.sh if ld.so.conf include pattern doesn't match any file.
Sometimes ld.so.conf has pattern include like "include ld.so.conf.d/*.conf", but there is no files that match pattern. In this case "for" loop in process_ld_so_conf function fails with error "No such file or directory". This patch uses "ls" to check that pattern matches at least one file. BUG=none Review URL: https://chromiumcodereview.appspot.com/19044004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214230 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/linux/sysroot_ld_path.sh')
-rwxr-xr-xbuild/linux/sysroot_ld_path.sh18
1 files changed, 10 insertions, 8 deletions
diff --git a/build/linux/sysroot_ld_path.sh b/build/linux/sysroot_ld_path.sh
index fd0bb92..74553c9 100755
--- a/build/linux/sysroot_ld_path.sh
+++ b/build/linux/sysroot_ld_path.sh
@@ -46,14 +46,16 @@ process_ld_so_conf() {
echo "$ENTRY" | grep -qs ^include
if [ $? -eq 0 ]; then
local included_files=$(echo "$ENTRY" | sed 's/^include //')
- for inc_file in $included_files; do
- echo $inc_file | grep -qs ^/
- if [ $? -eq 0 ]; then
- process_ld_so_conf "$root" "$root$inc_file"
- else
- process_ld_so_conf "$root" "$(pwd)/$inc_file"
- fi
- done
+ if ls $included_files >/dev/null 2>&1 ; then
+ for inc_file in $included_files; do
+ echo $inc_file | grep -qs ^/
+ if [ $? -eq 0 ]; then
+ process_ld_so_conf "$root" "$root$inc_file"
+ else
+ process_ld_so_conf "$root" "$(pwd)/$inc_file"
+ fi
+ done
+ fi
continue
fi