summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-07-26 10:31:59 +0000
committerZac Medico <zmedico@gentoo.org>2008-07-26 10:31:59 +0000
commit29b86c987aba118e75428fd01b8e4261a3eba685 (patch)
tree8912470ce66a9edce589a7e864582216e02225a1 /bin/misc-functions.sh
parentSplit out an apply_priorities() function to apply nice and ionice settings. (diff)
downloadportage-idfetch-29b86c987aba118e75428fd01b8e4261a3eba685.tar.gz
portage-idfetch-29b86c987aba118e75428fd01b8e4261a3eba685.tar.bz2
portage-idfetch-29b86c987aba118e75428fd01b8e4261a3eba685.zip
* Use pure bash ${PARAMETER%/*} instead of spawing`dirname`.
* Break out of loop as early as possible when searching for libs in ${D}. svn path=/main/trunk/; revision=11199
Diffstat (limited to 'bin/misc-functions.sh')
-rwxr-xr-xbin/misc-functions.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index b27c81e8..e8b23a4d 100755
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -170,7 +170,7 @@ install_qa_check() {
echo "${obj} ${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED
echo "${arch:3};${obj};${soname};${rpath};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.ELF.2
else
- dir=$(dirname ${obj})
+ dir=${obj%/*}
# replace $ORIGIN with the dirname of the current object for the lookup
opath=$(echo :${rpath}: | sed -e "s#.*:\(.*\)\$ORIGIN\(.*\):.*#\1${dir}\2#")
sneeded=$(echo ${needed} | tr , ' ')
@@ -178,7 +178,7 @@ install_qa_check() {
for lib in ${sneeded}; do
found=0
for path in ${opath//:/ }; do
- [ -e "${D}/${path}/${lib}" ] && found=1
+ [ -e "${D}/${path}/${lib}" ] && found=1 && break
done
[ "${found}" -eq 0 ] && rneeded="${rneeded},${lib}"
done