diff options
author | Brian Harring <ferringb@gmail.com> | 2006-05-20 21:05:39 -0700 |
---|---|---|
committer | Brian Harring <ferringb@gmail.com> | 2006-05-20 21:05:39 -0700 |
commit | b411c85e8f680129db681837487b372178a328a8 (patch) | |
tree | 3618cc9606fe1f190a38355149ff9bf305ede7fa /bin | |
parent | whitespace correction, remove debugging tee calls (diff) | |
download | pkgcore-b411c85e8f680129db681837487b372178a328a8.tar.gz pkgcore-b411c85e8f680129db681837487b372178a328a8.tar.bz2 pkgcore-b411c85e8f680129db681837487b372178a328a8.zip |
couple of changes.
1) move install/compile vars to be defined by dyn_compile.
2) fix single var/func filtering so they don't dump a newline
3) disable attribute dumping during load_environ, use what's in the env instead
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/ebuild-env/ebuild-default-functions.sh | 9 | ||||
-rwxr-xr-x | bin/ebuild-env/ebuild.sh | 19 |
2 files changed, 14 insertions, 14 deletions
diff --git a/bin/ebuild-env/ebuild-default-functions.sh b/bin/ebuild-env/ebuild-default-functions.sh index 369aed6b8..96d376e0f 100755 --- a/bin/ebuild-env/ebuild-default-functions.sh +++ b/bin/ebuild-env/ebuild-default-functions.sh @@ -254,6 +254,15 @@ abort_install() dyn_compile() { MUST_EXPORT_ENV="yes" + export DESTTREE=/usr + export INSDESTTREE="" + export EXEDESTTREE="" + export DOCDESTTREE="" + export INSOPTIONS="-m0644" + export EXEOPTIONS="-m0755" + export LIBOPTIONS="-m0644" + export DIROPTIONS="-m0755" + export MOPREFIX=${PN} trap "abort_compile" SIGINT SIGQUIT [ "${CFLAGS-unset}" != "unset" ] && export CFLAGS diff --git a/bin/ebuild-env/ebuild.sh b/bin/ebuild-env/ebuild.sh index e337cdf09..47cbfb881 100755 --- a/bin/ebuild-env/ebuild.sh +++ b/bin/ebuild-env/ebuild.sh @@ -157,7 +157,7 @@ export SANDBOX_ON="0" gen_func_filter() { if [ "$#" == "1" ]; then - echo "$1" + echo -n "$1" return fi echo -n "\($1" @@ -172,7 +172,7 @@ gen_func_filter() { gen_var_filter() { if [ "$#" == 1 ]; then - echo "$1" + echo -n "$1" return fi echo -n "\($1" @@ -229,7 +229,7 @@ dump_environ() { echo $'reinstate_loaded_env_attributes ()\n{' # echo "echo starting reinstate \${EBUILD_PHASE}>&2;" for y in export 'declare -i' readonly; do - x=$(${y} | sed -n "s:^declare \(-[^ ]\+ \)*\([A-Za-z0-9_+]\+\)\(=.*$\)\?:\2:; /^$(gen_var_filter ${DONT_EXPORT_VARS} x y)$/! p;") + x=$(${y} | sed -n "s:^declare \(-[^ ]\+ \)*\([A-Za-z0-9_+]\+\)\(=.*$\)\?$:\2:; /^$(gen_var_filter ${DONT_EXPORT_VARS} x y)$/! p;") [ -n "$x" ] && echo " ${y} $(echo $x);" # echo "echo dump- $y $(echo $x) >&2;" # echo "echo dump- $y original was $(echo $(${y})) >&2" @@ -349,7 +349,8 @@ load_environ() { eval "$(load_file "$src")" shopt -u execfail; unset -f declare load_file; - dump_environ; + # leave the existing reinstate attribs in place + dump_environ --no-attributes; )" ret=$? else @@ -418,16 +419,6 @@ init_environ() { fi - export DESTTREE=/usr - export INSDESTTREE="" - export EXEDESTTREE="" - export DOCDESTTREE="" - export INSOPTIONS="-m0644" - export EXEOPTIONS="-m0755" - export LIBOPTIONS="-m0644" - export DIROPTIONS="-m0755" - export MOPREFIX=${PN} - # if daemonized, it's already loaded these funcs. if [ "$DAEMONIZED" != "yes" ]; then source "${PORTAGE_BIN_PATH}/ebuild-functions.sh" || die "failed sourcing ebuild-functions.sh" |