1 |
commit: e6d387610ce692dfef3c6a3fc549d29863410176 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 2 02:28:31 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 2 02:28:31 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e6d38761 |
7 |
|
8 |
ecompressdir: fix funk_up_dir return value |
9 |
|
10 |
--- |
11 |
bin/ebuild-helpers/ecompressdir | 6 ++++-- |
12 |
1 files changed, 4 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir |
15 |
index a2c9e52..7d5d432 100755 |
16 |
--- a/bin/ebuild-helpers/ecompressdir |
17 |
+++ b/bin/ebuild-helpers/ecompressdir |
18 |
@@ -61,11 +61,11 @@ funk_up_dir() { |
19 |
local negate="" |
20 |
[[ ${act} == "compress" ]] && negate="!" |
21 |
|
22 |
+ local ret=0 |
23 |
# first we act on all the files |
24 |
find "${dir}" -type f ${negate} -iname '*'${suffix} -print0 | ${XARGS} -0 ${binary} |
25 |
((ret|=$?)) |
26 |
|
27 |
- find "${dir}" -type l -print0 | \ |
28 |
while read -r -d $'\0' brokenlink ; do |
29 |
[[ -e ${brokenlink} ]] && continue |
30 |
olddest=$(readlink "${brokenlink}") |
31 |
@@ -88,7 +88,8 @@ funk_up_dir() { |
32 |
&& ln -snf "${newdest}" "${brokenlink}${suffix}" \ |
33 |
|| ln -snf "${newdest}" "${brokenlink%${suffix}}" |
34 |
((ret|=$?)) |
35 |
- done |
36 |
+ done < <(find "${dir}" -type l -print0) |
37 |
+ return ${ret} |
38 |
} |
39 |
|
40 |
# _relocate_skip_dirs(srctree, dsttree) |
41 |
@@ -170,6 +171,7 @@ for dir in "$@" ; do |
42 |
if [[ -n ${suffix} ]] ; then |
43 |
vecho "${0##*/}: $(ecompress --bin) /${actual_dir#${ED}}" |
44 |
funk_up_dir "compress" "${suffix}" "ecompress" |
45 |
+ : $(( ret |= $? )) |
46 |
fi |
47 |
|
48 |
# finally, restore the skipped stuff |