aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-05 16:20:10 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-05 16:20:10 +0000
commitee2787ea78435c32d166d4f870afd1eff91f8a0f (patch)
tree5b7de45be925113843c6c132dbd4c2bebe546357
parent90d29bcd883ed717500795311386242576dbdc34 (diff)
downloadpaludis-ee2787ea78435c32d166d4f870afd1eff91f8a0f.tar.gz
paludis-ee2787ea78435c32d166d4f870afd1eff91f8a0f.tar.xz
Make more use of PALUDIS_EXTRA_DIE_MESSAGE
-rwxr-xr-xebuild/ebuild.bash17
-rw-r--r--ebuild/src_test.bash3
2 files changed, 20 insertions, 0 deletions
diff --git a/ebuild/ebuild.bash b/ebuild/ebuild.bash
index 8978489..18d5ba9 100755
--- a/ebuild/ebuild.bash
+++ b/ebuild/ebuild.bash
@@ -162,6 +162,19 @@ ebuild_load_ebuild()
if [[ -n "${PALUDIS_LOAD_ENVIRONMENT}" ]] ; then
[[ -d ${PALUDIS_TMPDIR} ]] \
|| die "You need to create PALUDIS_TMPDIR (${PALUDIS_TMPDIR})."
+
+ local save_PALUDIS_EXTRA_DIE_MESSAGE="${PALUDIS_EXTRA_DIE_MESSAGE}"
+ export PALUDIS_EXTRA_DIE_MESSAGE="
+!!! Could not extract the saved environment file. This is usually
+!!! caused by a broken environment.bz2 that was generated by an old
+!!! Portage version. The file that needs repairing is:
+!!! ${PALUDIS_LOAD_ENVIRONMENT}
+!!! Try copying this file, bunzip2ing it and sourcing it using a new
+!!! bash shell (do not continue to use said shell afterwards). You
+!!! should get an error that give you a rough idea of where the
+!!! problem lies.
+"
+
bunzip2 < "${PALUDIS_LOAD_ENVIRONMENT}" > ${PALUDIS_TMPDIR}/environment-${CATEGORY}-${PF} \
|| die "Can't extract ${PALUDIS_LOAD_ENVIRONMENT}"
@@ -181,6 +194,8 @@ ebuild_load_ebuild()
-e '/^\(declare \(-[^ ]\+ \)\?\)\?PALUDIS_EBUILD_DIR=/d' \
-e '/^\(declare \(-[^ ]\+ \)\?\)\?PALUDIS_COMMAND=/d' \
-e '/^\(declare \(-[^ ]\+ \)\?\)\?PALUDIS_HOME=/d' \
+ -e '/^\(declare \(-[^ ]\+ \)\?\)\?PALUDIS_EXTRA_DIE_MESSAGE=/d' \
+ -e '/^\(declare \(-[^ ]\+ \)\?\)\?EBUILD_KILL_PID=/d' \
-e '/^\(declare \(-[^ ]\+ \)\?\)\?ROOT=/d' \
-e '/^\(declare \(-[^ ]\+ \)\?\)\?SANDBOX/d' \
-e '/^\(declare \(-[^ ]\+ \)\?\)\?LD_/d' \
@@ -189,6 +204,8 @@ ebuild_load_ebuild()
source "${PALUDIS_TMPDIR}/environment-${CATEGORY}-${PF}" &>/dev/null \
|| die "Can't load saved environment"
+ export PALUDIS_EXTRA_DIE_MESSAGE="${save_PALUDIS_EXTRA_DIE_MESSAGE}"
+
rm "${PALUDIS_TMPDIR}/environment-${CATEGORY}-${PF}"
fi
diff --git a/ebuild/src_test.bash b/ebuild/src_test.bash
index ab07a0e..5a53732 100644
--- a/ebuild/src_test.bash
+++ b/ebuild/src_test.bash
@@ -44,6 +44,7 @@ ebuild_f_test()
local old_sandbox_predict="${SANDBOX_PREDICT}"
[[ -z "${PALUDIS_DO_NOTHING_SANDBOXY}" ]] && SANDBOX_PREDICT="${SANDBOX_PREDICT+${SANDBOX_PREDICT}:}/"
+ local save_PALUDIS_EXTRA_DIE_MESSAGE="${PALUDIS_EXTRA_DIE_MESSAGE}"
export PALUDIS_EXTRA_DIE_MESSAGE="
!!! This package failed inside the test phase. You should read
!!! http://paludis.berlios.de/KnownIssues.html
@@ -64,6 +65,8 @@ ebuild_f_test()
ebuild_section "Done src_test"
fi
+ export PALUDIS_EXTRA_DIE_MESSAGE="${save_PALUDIS_EXTRA_DIE_MESSAGE}"
+
[[ -z "${PALUDIS_DO_NOTHING_SANDBOXY}" ]] && SANDBOX_PREDICT="${old_sandbox_predict}"
true
}