aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-06-17 15:31:52 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2008-06-17 15:31:52 +0100
commitcd8a5d9ae2f46f738689e3f8e7241921a3045cc1 (patch)
tree25241d3d2214038157c7282e0925b2bacd978ad8
parent113ad182cec3cb145063b38f62141530a0ed4fef (diff)
downloadpaludis-cd8a5d9ae2f46f738689e3f8e7241921a3045cc1.tar.gz
paludis-cd8a5d9ae2f46f738689e3f8e7241921a3045cc1.tar.xz
Don't source the ebuild twice when installing.
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_init.bash4
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_initmisc.bash4
-rw-r--r--paludis/repositories/e/ebuild/0/builtin_initrm.bash4
-rwxr-xr-xpaludis/repositories/e/ebuild/ebuild.bash19
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_init.bash4
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash4
-rw-r--r--paludis/repositories/e/ebuild/exheres-0/builtin_initrm.bash4
7 files changed, 30 insertions, 13 deletions
diff --git a/paludis/repositories/e/ebuild/0/builtin_init.bash b/paludis/repositories/e/ebuild/0/builtin_init.bash
index daa921f..ee56fff 100644
--- a/paludis/repositories/e/ebuild/0/builtin_init.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_init.bash
@@ -79,6 +79,10 @@ builtin_init()
declare -r IMAGE="${IMAGE}"
export S="${WORKDIR}/${P}"
+
+ if [[ "${EBUILD}" != "-" ]] ; then
+ ebuild_load_ebuild "${EBUILD}"
+ fi
}
ebuild_f_init()
diff --git a/paludis/repositories/e/ebuild/0/builtin_initmisc.bash b/paludis/repositories/e/ebuild/0/builtin_initmisc.bash
index d7e3da0..e449f1d 100644
--- a/paludis/repositories/e/ebuild/0/builtin_initmisc.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_initmisc.bash
@@ -65,6 +65,10 @@ builtin_initmisc()
declare -r T="${T}"
export HOME="${T}"
export TMPDIR="${T}"
+
+ if [[ "${EBUILD}" != "-" ]] ; then
+ ebuild_load_ebuild "${EBUILD}"
+ fi
}
ebuild_f_initmisc()
diff --git a/paludis/repositories/e/ebuild/0/builtin_initrm.bash b/paludis/repositories/e/ebuild/0/builtin_initrm.bash
index cb7e45e..b06142e 100644
--- a/paludis/repositories/e/ebuild/0/builtin_initrm.bash
+++ b/paludis/repositories/e/ebuild/0/builtin_initrm.bash
@@ -65,6 +65,10 @@ builtin_initrm()
declare -r T="${T}"
export HOME="${T}"
export TMPDIR="${T}"
+
+ if [[ "${EBUILD}" != "-" ]] ; then
+ ebuild_load_ebuild "${EBUILD}"
+ fi
}
ebuild_f_initrm()
diff --git a/paludis/repositories/e/ebuild/ebuild.bash b/paludis/repositories/e/ebuild/ebuild.bash
index 88f3d01..3cea0a8 100755
--- a/paludis/repositories/e/ebuild/ebuild.bash
+++ b/paludis/repositories/e/ebuild/ebuild.bash
@@ -327,7 +327,6 @@ ebuild_load_environment()
ebuild_load_ebuild()
{
- export EBUILD="${1}"
unset ${SOURCE_MERGED_VARIABLES} ${BRACKET_MERGED_VARIABLES}
local v e_v
@@ -399,10 +398,11 @@ ebuild_main()
ebuild_notice "warning" "This will cause problems."
fi
- local action ebuild="$1"
+ local action
+ export EBUILD="${1}"
shift
- ebuild_notice "debug" "Using ebuild '${ebuild}', EAPI before source is '${EAPI}'"
+ ebuild_notice "debug" "Using ebuild '${EBUILD}', EAPI before source is '${EAPI}'"
if [[ ${#@} -ge 2 ]] ; then
ebuild_section "Running ebuild phases $@ as $(id -un ):$(id -gn )..."
@@ -434,10 +434,10 @@ ebuild_main()
esac
done
- if [[ $1 == metadata ]] || [[ $1 == variable ]] ; then
+ if [[ $1 == metadata ]] || [[ $1 == variable ]] || [[ $1 == pretend ]] ; then
export EBUILD_PHASE="${1}"
perform_hook ebuild_${action}_pre
- if [[ $1 != variable ]] || [[ -n "${ebuild}" ]] ; then
+ if [[ $1 != variable ]] || [[ -n "${EBUILD}" ]] ; then
for f in cut tr date ; do
eval "export ebuild_real_${f}=\"$(which $f )\""
eval "${f}() { ebuild_notice qa 'global scope ${f}' ; $(which $f ) \"\$@\" ; }"
@@ -445,7 +445,7 @@ ebuild_main()
for f in locked_pipe_command ; do
eval "${f}() { $(which $f ) \"\$@\" ; }"
done
- PATH="" ebuild_load_ebuild "${ebuild}"
+ PATH="" ebuild_load_ebuild "${EBUILD}"
fi
if ! ${PALUDIS_F_FUNCTION_PREFIX:-ebuild_f}_${1} ; then
perform_hook ebuild_${action}_fail
@@ -454,9 +454,6 @@ ebuild_main()
perform_hook ebuild_${action}_post
else
ebuild_load_environment
- if [[ "${ebuild}" != "-" ]] ; then
- ebuild_load_ebuild "${ebuild}"
- fi
for action in $@ ; do
export EBUILD_PHASE="${action}"
perform_hook ebuild_${action}_pre
@@ -464,10 +461,6 @@ ebuild_main()
perform_hook ebuild_${action}_fail
die "${action} failed"
fi
- if [[ ${action} == "init" ]] ; then
- # source again with WORKDIR set, so S=${WORKDIR}/blahblahblah works
- ebuild_load_ebuild "${ebuild}"
- fi
perform_hook ebuild_${action}_post
done
fi
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_init.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_init.bash
index 93c459c..909d5f0 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_init.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_init.bash
@@ -79,6 +79,10 @@ builtin_init()
declare -r IMAGE="${IMAGE}"
export S="${WORKDIR}/${P}"
+
+ if [[ "${EBUILD}" != "-" ]] ; then
+ ebuild_load_ebuild "${EBUILD}"
+ fi
}
exheres_internal_init()
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash
index b69fc58..8f82322 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_initmisc.bash
@@ -65,6 +65,10 @@ builtin_initmisc()
declare -r T="${T}"
export HOME="${T}"
export TMPDIR="${T}"
+
+ if [[ "${EBUILD}" != "-" ]] ; then
+ ebuild_load_ebuild "${EBUILD}"
+ fi
}
exheres_internal_initmisc()
diff --git a/paludis/repositories/e/ebuild/exheres-0/builtin_initrm.bash b/paludis/repositories/e/ebuild/exheres-0/builtin_initrm.bash
index cbf0098..e13c6a6 100644
--- a/paludis/repositories/e/ebuild/exheres-0/builtin_initrm.bash
+++ b/paludis/repositories/e/ebuild/exheres-0/builtin_initrm.bash
@@ -65,6 +65,10 @@ builtin_initrm()
declare -r T="${T}"
export HOME="${T}"
export TMPDIR="${T}"
+
+ if [[ "${EBUILD}" != "-" ]] ; then
+ ebuild_load_ebuild "${EBUILD}"
+ fi
}
exheres_internal_initrm()