summaryrefslogtreecommitdiffstats
path: root/bin/ebuild-helpers
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-06-01 19:28:31 -0700
committerZac Medico <zmedico@gentoo.org>2012-06-01 19:28:31 -0700
commite6d387610ce692dfef3c6a3fc549d29863410176 (patch)
tree1cf3bf2495412ce481fdf92755fc14e3f4750751 /bin/ebuild-helpers
parent415636896a148cac2c6f4406d80c669feb780f5e (diff)
downloadportage-e6d387610ce692dfef3c6a3fc549d29863410176.tar.gz
portage-e6d387610ce692dfef3c6a3fc549d29863410176.tar.bz2
portage-e6d387610ce692dfef3c6a3fc549d29863410176.zip
ecompressdir: fix funk_up_dir return value
Diffstat (limited to 'bin/ebuild-helpers')
-rwxr-xr-xbin/ebuild-helpers/ecompressdir6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir
index a2c9e52a0..7d5d4322b 100755
--- a/bin/ebuild-helpers/ecompressdir
+++ b/bin/ebuild-helpers/ecompressdir
@@ -61,11 +61,11 @@ funk_up_dir() {
local negate=""
[[ ${act} == "compress" ]] && negate="!"
+ local ret=0
# first we act on all the files
find "${dir}" -type f ${negate} -iname '*'${suffix} -print0 | ${XARGS} -0 ${binary}
((ret|=$?))
- find "${dir}" -type l -print0 | \
while read -r -d $'\0' brokenlink ; do
[[ -e ${brokenlink} ]] && continue
olddest=$(readlink "${brokenlink}")
@@ -88,7 +88,8 @@ funk_up_dir() {
&& ln -snf "${newdest}" "${brokenlink}${suffix}" \
|| ln -snf "${newdest}" "${brokenlink%${suffix}}"
((ret|=$?))
- done
+ done < <(find "${dir}" -type l -print0)
+ return ${ret}
}
# _relocate_skip_dirs(srctree, dsttree)
@@ -170,6 +171,7 @@ for dir in "$@" ; do
if [[ -n ${suffix} ]] ; then
vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED}}"
funk_up_dir "compress" "${suffix}" "ecompress"
+ : $(( ret |= $? ))
fi
# finally, restore the skipped stuff