summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/ebuild.sh42
1 files changed, 18 insertions, 24 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 0c3a20a58..3c31c87db 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -680,14 +680,12 @@ dyn_unpack() {
install -m${PORTAGE_WORKDIR_MODE:-0700} -d "${WORKDIR}" || die "Failed to create dir '${WORKDIR}'"
fi
cd "${WORKDIR}" || die "Directory change failed: \`cd '${WORKDIR}'\`"
- [ "$(type -t pre_src_unpack)" == "function" ] && qa_call pre_src_unpack
+ ebuild_phase pre_src_unpack
vecho ">>> Unpacking source..."
ebuild_phase src_unpack
touch "${PORTAGE_BUILDDIR}/.unpacked" || die "IO Failure -- Failed 'touch .unpacked' in ${PORTAGE_BUILDDIR}"
vecho ">>> Source unpacked in ${WORKDIR}"
- cd "${PORTAGE_BUILDDIR}"
-
- [ "$(type -t post_src_unpack)" == "function" ] && qa_call post_src_unpack
+ ebuild_phase post_src_unpack
}
dyn_clean() {
@@ -814,7 +812,7 @@ abort_handler() {
echo
eval ${3}
#unset signal handler
- trap SIGINT SIGQUIT
+ trap - SIGINT SIGQUIT
}
abort_prepare() {
@@ -872,7 +870,7 @@ dyn_prepare() {
vecho ">>> Source prepared."
ebuild_phase post_src_prepare
- trap SIGINT SIGQUIT
+ trap - SIGINT SIGQUIT
}
dyn_configure() {
@@ -885,18 +883,16 @@ dyn_configure() {
trap abort_configure SIGINT SIGQUIT
- [[ $(type -t pre_src_configure) = function ]] && \
- qa_call pre_src_configure
+ ebuild_phase pre_src_configure
vecho ">>> Configuring source in $srcdir ..."
ebuild_phase src_configure
touch "$PORTAGE_BUILDDIR"/.configured
vecho ">>> Source configured."
- [[ $(type -t post_src_configure) = function ]] && \
- qa_call post_src_configure
+ ebuild_phase post_src_configure
- trap SIGINT SIGQUIT
+ trap - SIGINT SIGQUIT
}
dyn_compile() {
@@ -909,17 +905,16 @@ dyn_compile() {
trap abort_compile SIGINT SIGQUIT
- [[ $(type -t pre_src_compile) = function ]] && \
- qa_call pre_src_compile
+ ebuild_phase pre_src_compile
vecho ">>> Compiling source in ${srcdir} ..."
ebuild_phase src_compile
touch "$PORTAGE_BUILDDIR"/.compiled
vecho ">>> Source compiled."
- [ "$(type -t post_src_compile)" == "function" ] && qa_call post_src_compile
+ ebuild_phase post_src_compile
- trap SIGINT SIGQUIT
+ trap - SIGINT SIGQUIT
}
dyn_test() {
@@ -929,7 +924,7 @@ dyn_test() {
# like it's supposed to here.
! hasq test ${USE} && export USE="${USE} test"
fi
- [ "$(type -t pre_src_test)" == "function" ] && qa_call pre_src_test
+ ebuild_phase pre_src_test
if [[ -e $PORTAGE_BUILDDIR/.tested ]] ; then
vecho ">>> It appears that ${PN} has already been tested; skipping."
return
@@ -951,10 +946,10 @@ dyn_test() {
SANDBOX_PREDICT="${SANDBOX_PREDICT%:/}"
fi
- cd "${PORTAGE_BUILDDIR}"
- touch .tested || die "Failed to 'touch .tested' in ${PORTAGE_BUILDDIR}"
- [ "$(type -t post_src_test)" == "function" ] && qa_call post_src_test
- trap SIGINT SIGQUIT
+ touch "$PORTAGE_BUILDDIR/.tested" || \
+ die "Failed to 'touch .tested' in $PORTAGE_BUILDDIR"
+ ebuild_phase post_src_test
+ trap - SIGINT SIGQUIT
}
dyn_install() {
@@ -967,7 +962,7 @@ dyn_install() {
return 0
fi
trap "abort_install" SIGINT SIGQUIT
- [ "$(type -t pre_src_install)" == "function" ] && qa_call pre_src_install
+ ebuild_phase pre_src_install
rm -rf "${PORTAGE_BUILDDIR}/image"
mkdir "${PORTAGE_BUILDDIR}/image"
if [ -d "${S}" ]; then
@@ -996,8 +991,7 @@ dyn_install() {
touch "${PORTAGE_BUILDDIR}/.installed"
vecho ">>> Completed installing ${PF} into ${D}"
vecho
- cd ${PORTAGE_BUILDDIR}
- [ "$(type -t post_src_install)" == "function" ] && qa_call post_src_install
+ ebuild_phase post_src_install
cd "${PORTAGE_BUILDDIR}"/build-info
set -f
@@ -1029,7 +1023,7 @@ dyn_install() {
then
touch DEBUGBUILD
fi
- trap SIGINT SIGQUIT
+ trap - SIGINT SIGQUIT
}
dyn_preinst() {