* [gentoo-commits] portage r15158 - main/trunk/bin/ebuild-helpers
@ 2010-01-04 17:00 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2010-01-04 17:00 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2010-01-04 17:00:27 +0000 (Mon, 04 Jan 2010)
New Revision: 15158
Modified:
main/trunk/bin/ebuild-helpers/doins
Log:
Bug #299248 - Fix doins return code handling to make sure it always fails
when appropriate. Thanks to Jonathan Callen <abcd@g.o> for the initial
patch.
Modified: main/trunk/bin/ebuild-helpers/doins
===================================================================
--- main/trunk/bin/ebuild-helpers/doins 2010-01-04 16:29:02 UTC (rev 15157)
+++ main/trunk/bin/ebuild-helpers/doins 2010-01-04 17:00:27 UTC (rev 15158)
@@ -63,12 +63,20 @@
}
_xdoins() {
+ local -i success=0 failed=0
while read -d $'\0' x ; do
_doins "$x" "${x%/*}"
+ if [[ $? -eq 0 ]] ; then
+ ((success|=1))
+ else
+ ((failed|=1))
+ fi
done
+ [[ $failed -ne 0 || $success -eq 0 ]] && return 1 || return 0
}
success=0
+failed=0
for x in "$@" ; do
if [[ $PRESERVE_SYMLINKS = n && -d $x ]] || \
@@ -100,15 +108,24 @@
fi
find "$x_orig" -type d -exec dodir "${INSDESTTREE}/{}" \;
find "$x_orig" \( -type f -or -type l \) -print0 | _xdoins
+ if [[ ${PIPESTATUS[1]} -eq 0 ]] ; then
+ ((success|=1))
+ else
+ ((failed|=1))
+ fi
if [[ $x != $x_orig ]] ; then
popd >/dev/null
mv "$TMP/1/$x_orig" "$x"
fi
while popd >/dev/null 2>&1 ; do true ; done
- ((success|=1))
else
- _doins "${x}" && ((success|=1))
+ _doins "${x}"
+ if [[ $? -eq 0 ]] ; then
+ ((success|=1))
+ else
+ ((failed|=1))
+ fi
fi
done
rm -rf "$TMP"
-[ $success -gt 0 ] && exit 0 || exit 1
+[[ $failed -ne 0 || $success -eq 0 ]] && exit 1 || exit 0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-04 17:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-04 17:00 [gentoo-commits] portage r15158 - main/trunk/bin/ebuild-helpers Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox