aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-01-01 22:19:11 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2008-01-01 22:19:11 +0000
commite88e16d3a9172ba5e613f59104b73938da318023 (patch)
tree0271f9db11c4f1ff15bc7603cc7f5d1bc385689c
parent67b077f81fe3954f8a64295d1cd5f9c7f4cf2b5c (diff)
downloadpaludis-e88e16d3a9172ba5e613f59104b73938da318023.tar.gz
paludis-e88e16d3a9172ba5e613f59104b73938da318023.tar.xz
Cope better with die not existing yet.
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash29
1 files changed, 16 insertions, 13 deletions
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index a91ff0f..75c692c 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -98,29 +98,32 @@ paludis_pipe_command()
{
[[ -n "${PALUDIS_SKIP_PIPE_COMMAND_CHECK}" ]] && return
- [[ -z "${PALUDIS_PIPE_COMMAND_WRITE_FD}" ]] && die "PALUDIS_PIPE_COMMAND_WRITE_FD unset"
- [[ -z "${PALUDIS_PIPE_COMMAND_READ_FD}" ]] && die "PALUDIS_PIPE_COMMAND_READ_FD unset"
+ if [[ -z "${PALUDIS_PIPE_COMMAND_WRITE_FD}" ]]; then
+ type die &>/dev/null && die "PALUDIS_PIPE_COMMAND_WRITE_FD unset"
+ echo "PALUDIS_PIPE_COMMAND_WRITE_FD unset" 1>&2
+ exit 123
+ fi
+ if [[ -z "${PALUDIS_PIPE_COMMAND_READ_FD}" ]]; then
+ type die &>/dev/null && die "PALUDIS_PIPE_COMMAND_READ_FD unset"
+ echo "PALUDIS_PIPE_COMMAND_READ_FD unset" 1>&2
+ exit 123
+ fi
local r r1 rest
r="$(echo "$@" | {
if ! locked_pipe_command "${PALUDIS_PIPE_COMMAND_WRITE_FD}" "${PALUDIS_PIPE_COMMAND_READ_FD}" ; then
- # die might not be available yet
- die "locked_pipe_command failed"
-
- echo "!!! locked_pipe_command failed, and no die available yet" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
- exit 249
+ type die &>/dev/null && die "locked_pipe_command failed"
+ echo "locked_pipe_command failed" 1>&2
+ exit 123
fi
})"
r1="${r:0:1}"
rest="${r:1}"
if [[ "${r1}" != "O" ]] ; then
- die "paludis_pipe_command returned error '${r1}' with text '${rest}'"
-
- echo "!!! paludis_pipe_command returned error '${r1}' with text '${rest}', and no die available yet" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
- exit 249
+ type die &>/dev/null && die "paludis_pipe_command returned error '${r1}' with text '${rest}'"
+ echo "paludis_pipe_command returned error '${r1}' with text '${rest}'" 1>&2
+ exit 123
fi
echo "$rest"