scripts/xldd: stop at first match 1.9
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Nov 23 21:35:10 2010 +0100 (2010-11-23)
branch1.9
changeset 21977579ac8ffe0b
parent 2196 dd7716f9aa11
child 2198 6d909657dbdf
scripts/xldd: stop at first match

Break the library search loop as soon as a match is found.
Previously, if a library was present in different places,
then the last occurence would be returned, when the first
one would have been used at runtime.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 78d2f99d403f7092203fc7a119ec19f9a2108afa)
scripts/xldd.in
     1.1 --- a/scripts/xldd.in	Tue Nov 23 21:34:56 2010 +0100
     1.2 +++ b/scripts/xldd.in	Tue Nov 23 21:35:10 2010 +0100
     1.3 @@ -170,12 +170,14 @@
     1.4      for d in "${needed_search_path[@]}"; do
     1.5          if [ -f "${root}${d}/${needed}" ]; then
     1.6              found="${d}/${needed}"
     1.7 +            break
     1.8          fi
     1.9      done
    1.10      if [ -z "${found}" ]; then
    1.11      for d in "${needed_search_path[@]}"; do
    1.12          if [ -f "${sysroot}${d}/${needed}" ]; then
    1.13              found_sysroot="${d}/${needed}"
    1.14 +            break
    1.15          fi
    1.16      done
    1.17      fi