1 |
Author: zmedico |
2 |
Date: 2009-03-23 02:14:58 +0000 (Mon, 23 Mar 2009) |
3 |
New Revision: 13151 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.6/bin/ebuild.sh |
7 |
Log: |
8 |
In order to avoid possible duplicate elog messages when using ebuild(1) to |
9 |
call the same phase multiple times, wipe out elog log files for the current |
10 |
phase just before executing the phase. Thanks to Mike Frysinger <vapier@g.o> |
11 |
for reporting. (trunk r13130) |
12 |
|
13 |
Modified: main/branches/2.1.6/bin/ebuild.sh |
14 |
=================================================================== |
15 |
--- main/branches/2.1.6/bin/ebuild.sh 2009-03-23 01:27:51 UTC (rev 13150) |
16 |
+++ main/branches/2.1.6/bin/ebuild.sh 2009-03-23 02:14:58 UTC (rev 13151) |
17 |
@@ -633,6 +633,7 @@ |
18 |
|
19 |
ebuild_phase_with_hooks() { |
20 |
local x phase_name=${1} |
21 |
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE" |
22 |
for x in {pre_,,post_}${phase_name} ; do |
23 |
ebuild_phase ${x} |
24 |
done |
25 |
@@ -682,6 +683,7 @@ |
26 |
if [ ! -d "${WORKDIR}" ]; then |
27 |
install -m${PORTAGE_WORKDIR_MODE:-0700} -d "${WORKDIR}" || die "Failed to create dir '${WORKDIR}'" |
28 |
fi |
29 |
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE" |
30 |
cd "${WORKDIR}" || die "Directory change failed: \`cd '${WORKDIR}'\`" |
31 |
ebuild_phase pre_src_unpack |
32 |
vecho ">>> Unpacking source..." |
33 |
@@ -867,6 +869,7 @@ |
34 |
|
35 |
trap abort_prepare SIGINT SIGQUIT |
36 |
|
37 |
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE" |
38 |
ebuild_phase pre_src_prepare |
39 |
vecho ">>> Preparing source in $srcdir ..." |
40 |
ebuild_phase src_prepare |
41 |
@@ -887,6 +890,7 @@ |
42 |
|
43 |
trap abort_configure SIGINT SIGQUIT |
44 |
|
45 |
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE" |
46 |
ebuild_phase pre_src_configure |
47 |
|
48 |
vecho ">>> Configuring source in $srcdir ..." |
49 |
@@ -909,6 +913,7 @@ |
50 |
|
51 |
trap abort_compile SIGINT SIGQUIT |
52 |
|
53 |
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE" |
54 |
ebuild_phase pre_src_compile |
55 |
|
56 |
vecho ">>> Compiling source in ${srcdir} ..." |
57 |
@@ -946,6 +951,7 @@ |
58 |
else |
59 |
local save_sp=${SANDBOX_PREDICT} |
60 |
addpredict / |
61 |
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE" |
62 |
ebuild_phase pre_src_test |
63 |
ebuild_phase src_test |
64 |
touch "$PORTAGE_BUILDDIR/.tested" || \ |
65 |
@@ -967,6 +973,7 @@ |
66 |
return 0 |
67 |
fi |
68 |
trap "abort_install" SIGINT SIGQUIT |
69 |
+ [ -n "$EBUILD_PHASE" ] && rm -f "$T/logging/$EBUILD_PHASE" |
70 |
ebuild_phase pre_src_install |
71 |
rm -rf "${PORTAGE_BUILDDIR}/image" |
72 |
mkdir "${PORTAGE_BUILDDIR}/image" |