summaryrefslogtreecommitdiffstats
path: root/bin/ebuild-helpers
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-01-06 16:06:35 +0000
committerZac Medico <zmedico@gentoo.org>2010-01-06 16:06:35 +0000
commitdb5458ce6699d79de8b0dd05d2ba9d01a6ad1b44 (patch)
tree9a647a22d727b592216c6b3a5b8019d1fe7bd6b0 /bin/ebuild-helpers
parentd0319df3fbc5c2eb0d04b17cfba35a3e0c661cbc (diff)
downloadportage-db5458ce6699d79de8b0dd05d2ba9d01a6ad1b44.tar.gz
portage-db5458ce6699d79de8b0dd05d2ba9d01a6ad1b44.tar.bz2
portage-db5458ce6699d79de8b0dd05d2ba9d01a6ad1b44.zip
Fix it so an empty directory given to doins -r does not trigger failure.
svn path=/main/trunk/; revision=15172
Diffstat (limited to 'bin/ebuild-helpers')
-rwxr-xr-xbin/ebuild-helpers/doins13
1 files changed, 6 insertions, 7 deletions
diff --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins
index cf4644770..db19750e3 100755
--- a/bin/ebuild-helpers/doins
+++ b/bin/ebuild-helpers/doins
@@ -63,16 +63,12 @@ _doins() {
}
_xdoins() {
- local -i success=0 failed=0
+ local -i failed=0
while read -d $'\0' x ; do
_doins "$x" "${x%/*}"
- if [[ $? -eq 0 ]] ; then
- ((success|=1))
- else
- ((failed|=1))
- fi
+ ((failed|=$?))
done
- [[ $failed -ne 0 || $success -eq 0 ]] && return 1 || return 0
+ return $failed
}
success=0
@@ -109,6 +105,9 @@ for x in "$@" ; do
find "$x_orig" -type d -exec dodir "${INSDESTTREE}/{}" \;
find "$x_orig" \( -type f -or -type l \) -print0 | _xdoins
if [[ ${PIPESTATUS[1]} -eq 0 ]] ; then
+ # NOTE: Even if only an empty directory is installed here, it
+ # still counts as success, since an empty directory given as
+ # an argument to doins -r should not trigger failure.
((success|=1))
else
((failed|=1))