aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/e/ebuild/utils
diff options
context:
space:
mode:
authorAvatar Bo Ørsted Andresen <bo.andresen@zlin.dk> 2008-06-10 17:48:16 +0000
committerAvatar Bo Ørsted Andresen <bo.andresen@zlin.dk> 2008-06-10 17:48:16 +0000
commit52a5d9b789b0998cdd2009c08f0ff24710887be0 (patch)
treeb4a438535eb9f1b45e1874be91e80f0e9c5072d4 /paludis/repositories/e/ebuild/utils
parent97a2f024cee04b28694739c276492c5fdf15d456 (diff)
downloadpaludis-52a5d9b789b0998cdd2009c08f0ff24710887be0.tar.gz
paludis-52a5d9b789b0998cdd2009c08f0ff24710887be0.tar.xz
Make failure in do* fatal and implement nonfatal in exheres-0.
Diffstat (limited to 'paludis/repositories/e/ebuild/utils')
-rw-r--r--paludis/repositories/e/ebuild/utils/Makefile.am1
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dobin11
-rw-r--r--paludis/repositories/e/ebuild/utils/dobin_TEST.bash70
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doconfd6
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dodir6
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dodoc12
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doenvd4
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doexe16
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doinfo13
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doinitd5
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doins13
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dolib14
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/doman10
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/domo11
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dosbin11
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/dosym13
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/emake8
-rw-r--r--paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am3
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/exheres-0/dodoc64
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/exheres-0/nonfatal (renamed from paludis/repositories/e/ebuild/utils/exheres-0/emake)14
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/fowners4
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/fperms4
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newbin7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newconfd7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newdoc7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newenvd7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newexe7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newinitd7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newins7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newlib.a.in7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newlib.so.in7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newman7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/newsbin7
-rwxr-xr-xpaludis/repositories/e/ebuild/utils/unpack5
34 files changed, 130 insertions, 265 deletions
diff --git a/paludis/repositories/e/ebuild/utils/Makefile.am b/paludis/repositories/e/ebuild/utils/Makefile.am
index 74ac3fb..d89c79c 100644
--- a/paludis/repositories/e/ebuild/utils/Makefile.am
+++ b/paludis/repositories/e/ebuild/utils/Makefile.am
@@ -81,7 +81,6 @@ TESTS_ENVIRONMENT = env \
bash $(top_srcdir)/paludis/repositories/e/ebuild/utils/run_test.bash
TESTS = \
- dobin_TEST.bash \
wrapped_getfsize_TEST.bash \
sed_TEST.bash \
awk_TEST.bash \
diff --git a/paludis/repositories/e/ebuild/utils/dobin b/paludis/repositories/e/ebuild/utils/dobin
index c7901b5..34cbd3a 100755
--- a/paludis/repositories/e/ebuild/utils/dobin
+++ b/paludis/repositories/e/ebuild/utils/dobin
@@ -21,18 +21,18 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting" >&2
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed" >&2
fi
if [[ ! -d "${D}${DESTTREE}/bin" ]]; then
- install -d "${D}${DESTTREE}/bin" || exit 3
+ install -d "${D}${DESTTREE}/bin" || paludis_die_or_error "${D}${DESTTREE}/bin is not a dir"
fi
ret=0
@@ -44,4 +44,5 @@ for x in "$@" ; do
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "dobin returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/dobin_TEST.bash b/paludis/repositories/e/ebuild/utils/dobin_TEST.bash
deleted file mode 100644
index 4f10e4d..0000000
--- a/paludis/repositories/e/ebuild/utils/dobin_TEST.bash
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/bash
-# vim: set sw=4 sts=4 et :
-
-# Copyright (c) 2006 Ciaran McCreesh
-#
-# This file is part of the Paludis package manager. Paludis is free software;
-# you can redistribute it and/or modify it under the terms of the GNU General
-# Public License version 2, as published by the Free Software Foundation.
-#
-# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-# details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA
-
-source ${PALUDIS_EBUILD_DIR}/install_functions.bash
-
-dobin_TEST()
-{
- mkdir -p dobin_TEST_dir/src dobin_TEST_dir/dst ; test_return_code
-
- echo "one contents" > dobin_TEST_dir/src/one ; test_return_code
- chmod +x dobin_TEST_dir/src/one ; test_return_code
-
- echo "two contents" > dobin_TEST_dir/src/two ; test_return_code
- chmod +x dobin_TEST_dir/src/two ; test_return_code
-
- echo "three contents" > dobin_TEST_dir/src/three ; test_return_code
- chmod +x dobin_TEST_dir/src/three ; test_return_code
-
- export D=dobin_TEST_dir/dst
- ${PALUDIS_EBUILD_DIR}/utils/dobin dobin_TEST_dir/src/one &>/dev/null ; test_return_code
- ${PALUDIS_EBUILD_DIR}/utils/dobin dobin_TEST_dir/src/two dobin_TEST_dir/src/three &>/dev/null ; test_return_code
-
- [[ -f dobin_TEST_dir/dst/usr/bin/one ]] ; test_return_code
- [[ -f dobin_TEST_dir/dst/usr/bin/two ]] ; test_return_code
- [[ -f dobin_TEST_dir/dst/usr/bin/three ]] ; test_return_code
-
- test_equality "$(< dobin_TEST_dir/dst/usr/bin/one)" "one contents"
- test_equality "$(< dobin_TEST_dir/dst/usr/bin/two)" "two contents"
- test_equality "$(< dobin_TEST_dir/dst/usr/bin/three)" "three contents"
-
- rm -fr dobin_TEST_dir
-}
-
-dobin_fail_TEST()
-{
- mkdir -p dobin_TEST_dir/src dobin_TEST_dir/dst ; test_return_code
- echo "one contents" > dobin_TEST_dir/src/one ; test_return_code
- echo "two contents" > dobin_TEST_dir/src/two ; test_return_code
- echo "three contents" > dobin_TEST_dir/src/three ; test_return_code
-
- export D=dobin_TEST_dir/dst
- ! ${PALUDIS_EBUILD_DIR}/utils/dobin dobin_TEST_dir/src/four &>/dev/null ; test_return_code
- ! ${PALUDIS_EBUILD_DIR}/utils/dobin dobin_TEST_dir/src/one dobin_TEST_dir/src/seven &>/dev/null ; test_return_code
- ! ${PALUDIS_EBUILD_DIR}/utils/dobin dobin_TEST_dir/src/eight dobin_TEST_dir/src/one &>/dev/null ; test_return_code
-
- [[ -f dobin_TEST_dir/dst/usr/bin/one ]] ; test_return_code
- ! [[ -f dobin_TEST_dir/dst/usr/bin/four ]] ; test_return_code
- ! [[ -f dobin_TEST_dir/dst/usr/bin/five ]] ; test_return_code
- ! [[ -f dobin_TEST_dir/dst/usr/bin/six ]] ; test_return_code
-
- test_equality "$(< dobin_TEST_dir/dst/usr/bin/one)" "one contents"
-
- rm -fr dobin_TEST_dir
-}
-
diff --git a/paludis/repositories/e/ebuild/utils/doconfd b/paludis/repositories/e/ebuild/utils/doconfd
index 75479b7..a46e8be 100755
--- a/paludis/repositories/e/ebuild/utils/doconfd
+++ b/paludis/repositories/e/ebuild/utils/doconfd
@@ -21,11 +21,11 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
-if [ ${#} -lt 1 ]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+if [[ ${#} -lt 1 ]]; then
+ paludis_die_or_error "at least one argument needed"
fi
INSDESTTREE=/etc/conf.d/
diff --git a/paludis/repositories/e/ebuild/utils/dodir b/paludis/repositories/e/ebuild/utils/dodir
index 79c6254..fca8d9a 100755
--- a/paludis/repositories/e/ebuild/utils/dodir
+++ b/paludis/repositories/e/ebuild/utils/dodir
@@ -21,9 +21,10 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
ret=0
@@ -31,4 +32,5 @@ for x in "$@"; do
install -d ${DIROPTIONS} "${D}${x}" || ret=2
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "dodir returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/dodoc b/paludis/repositories/e/ebuild/utils/dodoc
index 6a54006..37b7fd2 100755
--- a/paludis/repositories/e/ebuild/utils/dodoc
+++ b/paludis/repositories/e/ebuild/utils/dodoc
@@ -2,6 +2,7 @@
# vim: set sw=4 sts=4 et :
# Copyright (c) 2006 Stephen Bennett
+# Copyright (c) 2007 Ciaran McCreesh
#
# Based in part upon dodoc from Portage, which is Copyright 1995-2005
# Gentoo Foundation and distributed under the terms of the GNU General
@@ -21,19 +22,19 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ $# -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
dir="${D}usr/share/doc/${PF}/${DOCDESTTREE}"
if [[ ! -d "${dir}" ]]; then
- install -d "${dir}" || exit 3
+ install -d "${dir}" || paludis_die_or_error "could not create ${dir}"
fi
ret=0
@@ -47,4 +48,5 @@ for x in "$@"; do
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "dodoc returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/doenvd b/paludis/repositories/e/ebuild/utils/doenvd
index 427fdeb..91d2677 100755
--- a/paludis/repositories/e/ebuild/utils/doenvd
+++ b/paludis/repositories/e/ebuild/utils/doenvd
@@ -21,11 +21,11 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
export INSDESTTREE=/etc/env.d/
diff --git a/paludis/repositories/e/ebuild/utils/doexe b/paludis/repositories/e/ebuild/utils/doexe
index 61189fb..e3f3207 100755
--- a/paludis/repositories/e/ebuild/utils/doexe
+++ b/paludis/repositories/e/ebuild/utils/doexe
@@ -21,23 +21,24 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed"
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
if [[ ! -d "${D}${EXEDESTTREE}" ]]; then
- install -d "${D}${EXEDESTTREE}" || exit 3
+ if ! install -d "${D}${EXEDESTTREE}" ; then
+ paludis_die_or_error "could not create ${D}${EXEDESTTREE}"
+ fi
fi
ret=0
@@ -55,4 +56,5 @@ for x in "$@"; do
install ${EXEOPTIONS} "${mysrc}" "${D}${EXEDESTTREE}" || ret=2
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "doexe returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/doinfo b/paludis/repositories/e/ebuild/utils/doinfo
index 6072379..223f61e 100755
--- a/paludis/repositories/e/ebuild/utils/doinfo
+++ b/paludis/repositories/e/ebuild/utils/doinfo
@@ -21,30 +21,31 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 1
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
if [[ ! -d "${D}usr/share/info" ]]; then
- install -d "${D}usr/share/info" || exit 3
+ install -d "${D}usr/share/info" || paludis_die_or_error "could not create ${D}usr/share/info"
fi
ret=0
for x in "$@"; do
if [[ -e "${x}" ]]; then
- install -m0644 "${x}" "${D}usr/share/info"
+ install -m0644 "${x}" "${D}usr/share/info" || ret=2
else
echo "${0}: ${x} does not exist"
ret=2
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "doinfo returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/doinitd b/paludis/repositories/e/ebuild/utils/doinitd
index 85a3e06..3e9904d 100755
--- a/paludis/repositories/e/ebuild/utils/doinitd
+++ b/paludis/repositories/e/ebuild/utils/doinitd
@@ -21,11 +21,12 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
EXEDESTTREE=/etc/init.d
diff --git a/paludis/repositories/e/ebuild/utils/doins b/paludis/repositories/e/ebuild/utils/doins
index b37099e..6de34f8 100755
--- a/paludis/repositories/e/ebuild/utils/doins
+++ b/paludis/repositories/e/ebuild/utils/doins
@@ -22,20 +22,18 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
if [[ ${1} == "-r" ]]; then
@@ -54,7 +52,7 @@ if [[ ${INSDESTTREE} == ${D}* ]]; then
echo "You should not use \${D} with helpers." >&2
echo " --> ${INSDESTTREE}" >&2
echo "-------------------------------------------------------" >&2
- exit 248
+ paludis_die_or_error
fi
if [[ ! -d "${D}${INSDESTTREE}" ]]; then
@@ -86,4 +84,5 @@ for x in "$@"; do
install ${INSOPTIONS} "${mysrc}" "${D}${INSDESTTREE}" || ret=2
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "doins returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/dolib b/paludis/repositories/e/ebuild/utils/dolib
index d636764..0fed548 100755
--- a/paludis/repositories/e/ebuild/utils/dolib
+++ b/paludis/repositories/e/ebuild/utils/dolib
@@ -21,14 +21,14 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ! -d ${PALUDIS_EBUILD_MODULES_DIR} ]]; then
- echo "${0}: \${PALUDIS_EBUILD_MODULES_DIR} not valid; aborting" >&2
- exit 1
+ paludis_die_or_error "\${PALUDIS_EBUILD_MODULES_DIR} not valid; aborting"
fi
source "${PALUDIS_EBUILD_MODULES_DIR}/multilib_functions.bash"
@@ -36,12 +36,11 @@ source "${PALUDIS_EBUILD_MODULES_DIR}/multilib_functions.bash"
libdir="${D}${DESTTREE}/$(ebuild_get_libdir)"
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed"
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
if [[ ! -d ${libdir} ]]; then
- install -d "${libdir}" || exit 3
+ install -d "${libdir}" || paludis_die_or_error "could not create ${libdir}"
fi
ret=0
@@ -59,4 +58,5 @@ for x in "$@"; do
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "dolib returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/doman b/paludis/repositories/e/ebuild/utils/doman
index 20fc7a2..18e46d3 100755
--- a/paludis/repositories/e/ebuild/utils/doman
+++ b/paludis/repositories/e/ebuild/utils/doman
@@ -21,18 +21,19 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
BASE="/usr/share"
i18n=""
+ret=0
for x in "$@"; do
if [[ ${x:0:6} == "-i18n=" ]]; then
@@ -72,4 +73,5 @@ for x in "$@"; do
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "doman returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/domo b/paludis/repositories/e/ebuild/utils/domo
index 1a1747a..fe3d57c 100755
--- a/paludis/repositories/e/ebuild/utils/domo
+++ b/paludis/repositories/e/ebuild/utils/domo
@@ -21,18 +21,18 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
if [[ ! -d "${D}${DESTTREE}/share/locale" ]]; then
- install -d "${D}${DESTTREE}/share/locale" || exit 3
+ install -d "${D}${DESTTREE}/share/locale" || paludis_die_or_error "could not create ${D}${DESTTREE}/share/locale"
fi
ret=0
@@ -51,4 +51,5 @@ for x in "$@"; do
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "domo returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/dosbin b/paludis/repositories/e/ebuild/utils/dosbin
index c72d9c5..3ce589c 100755
--- a/paludis/repositories/e/ebuild/utils/dosbin
+++ b/paludis/repositories/e/ebuild/utils/dosbin
@@ -21,18 +21,18 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ${#} -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- exit 1
+ paludis_die_or_error "at least one argument needed"
fi
if [[ ! -d "${D}${DESTTREE}/sbin" ]]; then
- install -d "${D}${DESTTREE}/sbin" || exit 3
+ install -d "${D}${DESTTREE}/sbin" || paludis_die_or_error "could not create ${D}${DESTTREE}/sbin"
fi
ret=0
@@ -44,4 +44,5 @@ for x in "$@"; do
fi
done
+[[ 0 != "${ret}" ]] && paludis_die_or_error "dosbin returned error ${ret}"
exit ${ret}
diff --git a/paludis/repositories/e/ebuild/utils/dosym b/paludis/repositories/e/ebuild/utils/dosym
index e1cbcea..5ffb7bb 100755
--- a/paludis/repositories/e/ebuild/utils/dosym
+++ b/paludis/repositories/e/ebuild/utils/dosym
@@ -22,28 +22,25 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source ${PALUDIS_EBUILD_DIR}/die_functions.bash
source ${PALUDIS_EBUILD_DIR}/pipe_functions.bash
source ${PALUDIS_EBUILD_DIR}/output_functions.bash
if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${D} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed."
fi
if [[ ! -d $(dirname "${D}$2") ]]; then
if [[ -n "${PALUDIS_DOSYM_NO_MKDIR}" ]] ; then
- echo "dosym: error: target directory $(dirname "${D}$2" ) does not exist" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
- exit 123
+ die "error: target directory $(dirname "${D}$2" ) does not exist"
else
ebuild_notice "qa" "$0: target directory $(dirname "${D}$2") does not exist; creating. Please fix the ebuild to create it explicitly."
dodir $(dirname $2)
fi
fi
-ln -snf "${1}" "${D}${2}"
+ln -snf "${1}" "${D}${2}" || paludis_die_or_error "creation of symlink ${D}${2} failed"
diff --git a/paludis/repositories/e/ebuild/utils/emake b/paludis/repositories/e/ebuild/utils/emake
index f6fa8ca..55e0d2c 100755
--- a/paludis/repositories/e/ebuild/utils/emake
+++ b/paludis/repositories/e/ebuild/utils/emake
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006 Ciaran McCreesh
+# Copyright (c) 2006, 2007 Ciaran McCreesh
#
# This file is part of the Paludis package manager. Paludis is free software;
# you can redistribute it and/or modify it under the terms of the GNU General
@@ -17,6 +17,10 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
echo ${EMAKE_WRAPPER} ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@" 1>&2
${EMAKE_WRAPPER} ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
-
+ret=$?
+[[ 0 != $ret ]] && paludis_die_or_error "emake returned error $ret"
+exit $ret
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am b/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
index 48f4dc6..2d2d71c 100644
--- a/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/Makefile.am
@@ -4,11 +4,11 @@ SUBDIRS = .
libexecprogdir = $(libexecdir)/paludis/utils/exheres-0
libexecprog_SCRIPTS = \
- dodoc \
dohard \
dohtml \
dosed \
donewins \
+ nonfatal \
prepall \
prepallstrip \
prepstrip \
@@ -20,7 +20,6 @@ libexecprog_SCRIPTS = \
prepalldocs \
ecompress \
ecompressdir \
- emake \
banned_in_eapi_exheres-0
AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/dodoc b/paludis/repositories/e/ebuild/utils/exheres-0/dodoc
deleted file mode 100755
index e53e0bb..0000000
--- a/paludis/repositories/e/ebuild/utils/exheres-0/dodoc
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/bin/bash
-# vim: set sw=4 sts=4 et :
-
-# Copyright (c) 2006 Stephen Bennett
-# Copyright (c) 2007 Ciaran McCreesh
-#
-# Based in part upon dodoc from Portage, which is Copyright 1995-2005
-# Gentoo Foundation and distributed under the terms of the GNU General
-# Public License v2.
-#
-# This file is part of the Paludis package manager. Paludis is free software;
-# you can redistribute it and/or modify it under the terms of the GNU General
-# Public License as published by the Free Software Foundation; either version
-# 2 of the License, or (at your option) any later version.
-#
-# Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-# details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA
-
-if [[ ! -d ${D} ]]; then
- echo "${0}: \${D} not valid; aborting" >&2
- echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
- exit 247
-fi
-
-if [[ $# -lt 1 ]]; then
- echo "${0}: at least one argument needed" >&2
- echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
- exit 1
-fi
-
-dir="${D}usr/share/doc/${PF}/${DOCDESTTREE}"
-if [[ ! -d "${dir}" ]]; then
- if ! install -d "${dir}" ; then
- echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
- exit 3
- fi
-fi
-
-ret=0
-
-for x in "$@"; do
- if [[ -s "${x}" ]]; then
- install -m0644 "${x}" "${dir}"
- elif [[ ! -e "${x}" ]]; then
- echo "${0}: ${x} does not exist" >&2
- ret=2
- fi
-done
-
-if [[ 0 != "${ret}" ]] ; then
- echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
-fi
-exit ${ret}
-
diff --git a/paludis/repositories/e/ebuild/utils/exheres-0/emake b/paludis/repositories/e/ebuild/utils/exheres-0/nonfatal
index b092f7f..28167cb 100755
--- a/paludis/repositories/e/ebuild/utils/exheres-0/emake
+++ b/paludis/repositories/e/ebuild/utils/exheres-0/nonfatal
@@ -1,7 +1,7 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-# Copyright (c) 2006, 2007 Ciaran McCreesh
+# Copyright (c) 2008 Bo Ørsted Andresen
#
# This file is part of the Paludis package manager. Paludis is free software;
# you can redistribute it and/or modify it under the terms of the GNU General
@@ -17,13 +17,5 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-echo ${EMAKE_WRAPPER} ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@" 1>&2
-${EMAKE_WRAPPER} ${MAKE:-make} ${MAKEOPTS} ${EXTRA_EMAKE} "$@"
-ret=$?
-if [[ 0 != $ret ]] ; then
- echo "emake returned error $ret" 1>&2
- echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
-fi
-
-exit $ret
+export PALUDIS_FAILURE_IS_FATAL= PALUDIS_FAILURE_IS_NONFATAL=yes
+exec "${@}"
diff --git a/paludis/repositories/e/ebuild/utils/fowners b/paludis/repositories/e/ebuild/utils/fowners
index b0b3af1..7f450a2 100755
--- a/paludis/repositories/e/ebuild/utils/fowners
+++ b/paludis/repositories/e/ebuild/utils/fowners
@@ -21,4 +21,6 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-chown "${@/#\//${D}/}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
+chown "${@/#\//${D}/}" || paludis_die_or_error "chown returned error $?"
diff --git a/paludis/repositories/e/ebuild/utils/fperms b/paludis/repositories/e/ebuild/utils/fperms
index 4b94e4e..0722704 100755
--- a/paludis/repositories/e/ebuild/utils/fperms
+++ b/paludis/repositories/e/ebuild/utils/fperms
@@ -21,4 +21,6 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-chmod "${@/#\//${D}/}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
+
+chmod "${@/#\//${D}/}" || paludis_die_or_error "chmod returned error $?"
diff --git a/paludis/repositories/e/ebuild/utils/newbin b/paludis/repositories/e/ebuild/utils/newbin
index aa5ae16..78e9741 100755
--- a/paludis/repositories/e/ebuild/utils/newbin
+++ b/paludis/repositories/e/ebuild/utils/newbin
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed."
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newconfd b/paludis/repositories/e/ebuild/utils/newconfd
index 4270bc5..7ddb13f 100755
--- a/paludis/repositories/e/ebuild/utils/newconfd
+++ b/paludis/repositories/e/ebuild/utils/newconfd
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed."
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newdoc b/paludis/repositories/e/ebuild/utils/newdoc
index 167efa8..694e3b6 100755
--- a/paludis/repositories/e/ebuild/utils/newdoc
+++ b/paludis/repositories/e/ebuild/utils/newdoc
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newenvd b/paludis/repositories/e/ebuild/utils/newenvd
index e147843..57c29bc 100755
--- a/paludis/repositories/e/ebuild/utils/newenvd
+++ b/paludis/repositories/e/ebuild/utils/newenvd
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newexe b/paludis/repositories/e/ebuild/utils/newexe
index 911a565..3584088 100755
--- a/paludis/repositories/e/ebuild/utils/newexe
+++ b/paludis/repositories/e/ebuild/utils/newexe
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newinitd b/paludis/repositories/e/ebuild/utils/newinitd
index 69c6149..7322aee 100755
--- a/paludis/repositories/e/ebuild/utils/newinitd
+++ b/paludis/repositories/e/ebuild/utils/newinitd
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newins b/paludis/repositories/e/ebuild/utils/newins
index 5d385e3..b87555c 100755
--- a/paludis/repositories/e/ebuild/utils/newins
+++ b/paludis/repositories/e/ebuild/utils/newins
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newlib.a.in b/paludis/repositories/e/ebuild/utils/newlib.a.in
index c146ed2..f723355 100755
--- a/paludis/repositories/e/ebuild/utils/newlib.a.in
+++ b/paludis/repositories/e/ebuild/utils/newlib.a.in
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newlib.so.in b/paludis/repositories/e/ebuild/utils/newlib.so.in
index 3916298..8be5491 100755
--- a/paludis/repositories/e/ebuild/utils/newlib.so.in
+++ b/paludis/repositories/e/ebuild/utils/newlib.so.in
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newman b/paludis/repositories/e/ebuild/utils/newman
index c228a16..99721db 100755
--- a/paludis/repositories/e/ebuild/utils/newman
+++ b/paludis/repositories/e/ebuild/utils/newman
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/newsbin b/paludis/repositories/e/ebuild/utils/newsbin
index b8f5927..9aad1bb 100755
--- a/paludis/repositories/e/ebuild/utils/newsbin
+++ b/paludis/repositories/e/ebuild/utils/newsbin
@@ -22,15 +22,14 @@
# Place, Suite 330, Boston, MA 02111-1307 USA
export PATH="${PALUDIS_EBUILD_DIR:+${PALUDIS_EBUILD_DIR}/utils:}${PATH}"
+source "${PALUDIS_EBUILD_DIR}"/die_functions.bash
if [[ ! -d ${T} ]]; then
- echo "${0}: \${T} not valid; aborting" >&2
- exit 247
+ paludis_die_or_error "\${T} not valid; aborting"
fi
if [[ ${#} -ne 2 ]]; then
- echo "${0}: exactly two arguments needed" >&2
- exit 1
+ paludis_die_or_error "exactly two arguments needed"
fi
rm -rf "${T}/${2}"
diff --git a/paludis/repositories/e/ebuild/utils/unpack b/paludis/repositories/e/ebuild/utils/unpack
index b682710..94da791 100755
--- a/paludis/repositories/e/ebuild/utils/unpack
+++ b/paludis/repositories/e/ebuild/utils/unpack
@@ -24,7 +24,10 @@
die()
{
echo "unpack: error: $@" 1>&2
- kill -s SIGUSR1 "${EBUILD_KILL_PID}"
+ if [[ -z ${PALUDIS_FAILURE_IS_NONFATAL} ]]; then
+ echo "$(basename ${0} ): making ebuild PID ${EBUILD_KILL_PID} exit with error" 1>&2
+ kill -s SIGUSR1 "${EBUILD_KILL_PID}"
+ fi
exit 123
}
assert()