From 767cbccaa9735a646193b50e69b686fc0139df5e Mon Sep 17 00:00:00 2001 From: "glider@chromium.org" Date: Fri, 14 Feb 2014 17:03:20 +0000 Subject: [PATCH] Fix sysroot_ld_path.sh to correctly process the included configs. The $included_files var contains a list of paths relative to the sysroot. However calling `ls $included_files` gives us a list of paths relative to the host system root, which is obviously wrong. We need to do `ls $root$included_files` instead. BUG=324207 R=thestig@chromium.org CC=sl.ostapenko@samsung.com Review URL: https://codereview.chromium.org/163103003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251356 0039d316-1c4b-4281-b951-d872f2087c98 --- build/linux/sysroot_ld_path.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/build/linux/sysroot_ld_path.sh b/build/linux/sysroot_ld_path.sh index 74553c93638729..4b8bf7305e2f28 100755 --- a/build/linux/sysroot_ld_path.sh +++ b/build/linux/sysroot_ld_path.sh @@ -46,15 +46,19 @@ process_ld_so_conf() { echo "$ENTRY" | grep -qs ^include if [ $? -eq 0 ]; then local included_files=$(echo "$ENTRY" | sed 's/^include //') - 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 + echo "$included_files" | grep -qs ^/ + if [ $? -eq 0 ]; then + if ls $root$included_files >/dev/null 2>&1 ; then + for inc_file in $root$included_files; do + process_ld_so_conf "$root" "$inc_file" + done + fi + else + if ls $(pwd)/$included_files >/dev/null 2>&1 ; then + for inc_file in $(pwd)/$included_files; do + process_ld_so_conf "$root" "$inc_file" + done + fi fi continue fi