summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-23 02:14:58 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-23 02:14:58 +0000
commite8c71e660b1a86bbfebddb14fb7c87f3b51602b3 (patch)
tree3882bbf9c7a90d3e1bcfee5665124d8098c66954
parentValidate argument atoms earlier for build actions. (trunk r13126) (diff)
downloadportage-multirepo-e8c71e660b1a86bbfebddb14fb7c87f3b51602b3.tar.gz
portage-multirepo-e8c71e660b1a86bbfebddb14fb7c87f3b51602b3.tar.bz2
portage-multirepo-e8c71e660b1a86bbfebddb14fb7c87f3b51602b3.zip
In order to avoid possible duplicate elog messages when using ebuild(1) to
call the same phase multiple times, wipe out elog log files for the current phase just before executing the phase. Thanks to Mike Frysinger <vapier@g.o> for reporting. (trunk r13130) svn path=/main/branches/2.1.6/; revision=13151
-rwxr-xr-xbin/ebuild.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 2223dd3b..1c448c82 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -633,6 +633,7 @@ ebuild_phase() {
ebuild_phase_with_hooks() {
local x phase_name=${1}
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE"
for x in {pre_,,post_}${phase_name} ; do
ebuild_phase ${x}
done
@@ -682,6 +683,7 @@ dyn_unpack() {
if [ ! -d "${WORKDIR}" ]; then
install -m${PORTAGE_WORKDIR_MODE:-0700} -d "${WORKDIR}" || die "Failed to create dir '${WORKDIR}'"
fi
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE"
cd "${WORKDIR}" || die "Directory change failed: \`cd '${WORKDIR}'\`"
ebuild_phase pre_src_unpack
vecho ">>> Unpacking source..."
@@ -867,6 +869,7 @@ dyn_prepare() {
trap abort_prepare SIGINT SIGQUIT
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE"
ebuild_phase pre_src_prepare
vecho ">>> Preparing source in $srcdir ..."
ebuild_phase src_prepare
@@ -887,6 +890,7 @@ dyn_configure() {
trap abort_configure SIGINT SIGQUIT
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE"
ebuild_phase pre_src_configure
vecho ">>> Configuring source in $srcdir ..."
@@ -909,6 +913,7 @@ dyn_compile() {
trap abort_compile SIGINT SIGQUIT
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE"
ebuild_phase pre_src_compile
vecho ">>> Compiling source in ${srcdir} ..."
@@ -946,6 +951,7 @@ dyn_test() {
else
local save_sp=${SANDBOX_PREDICT}
addpredict /
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE"
ebuild_phase pre_src_test
ebuild_phase src_test
touch "$PORTAGE_BUILDDIR/.tested" || \
@@ -967,6 +973,7 @@ dyn_install() {
return 0
fi
trap "abort_install" SIGINT SIGQUIT
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE"
ebuild_phase pre_src_install
rm -rf "${PORTAGE_BUILDDIR}/image"
mkdir "${PORTAGE_BUILDDIR}/image"