summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-11-19 06:46:09 +0000
committerZac Medico <zmedico@gentoo.org>2007-11-19 06:46:09 +0000
commit40fd1b85886ec13c31e07ea69fbe569261202620 (patch)
treebc392c6f3d830e0c800d00de469c151b51a47cc5 /bin
parent3a372e3e28f111ea27e20124a0b800223e7dfffa (diff)
downloadportage-40fd1b85886ec13c31e07ea69fbe569261202620.tar.gz
portage-40fd1b85886ec13c31e07ea69fbe569261202620.tar.bz2
portage-40fd1b85886ec13c31e07ea69fbe569261202620.zip
When creating environment.bz2 at the end of dyn_compile(),
reduce bloat by filtering out functions that are defined internally by portage. This reduces the size of the resulting environment.bz2 file by approximately 10 KB. svn path=/main/trunk/; revision=8527
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ebuild.sh27
1 files changed, 25 insertions, 2 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 7c9123d8d..f96c68154 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -943,8 +943,31 @@ dyn_compile() {
echo "${USE}" > USE
echo "${EAPI:-0}" > EAPI
set +f
- set > environment
- export | sed 's:^declare -rx:declare -x:' >> environment
+ (
+ # There's no need to bloat environment.bz2 with internally defined
+ # functions and variables, so filter them out if possible.
+
+ unset -f dump_trace diefunc quiet_mode vecho elog_base eqawarn elog \
+ esyslog einfo einfon ewarn eerror ebegin _eend eend KV_major \
+ KV_minor KV_micro KV_to_int get_KV unset_colors set_colors has \
+ hasv hasq qa_source qa_call addread addwrite adddeny addpredict \
+ lchown lchgrp esyslog use usev useq has_version portageq \
+ best_version use_with use_enable register_die_hook check_KV \
+ keepdir unpack strip_duplicate_slashes econf einstall gen_wrapper \
+ dyn_setup dyn_unpack dyn_clean into insinto exeinto docinto \
+ insopts diropts exeopts libopts abort_handler abort_compile \
+ abort_test abort_install dyn_compile dyn_test dyn_install \
+ dyn_preinst dyn_help debug-print debug-print-function \
+ debug-print-section inherit EXPORT_FUNCTIONS newdepend newrdepend \
+ newpdepend do_newdepend remove_path_entry killparent
+
+ {
+ set | egrep -v -e '^SANDBOX_' -e '^LD_PRELOAD=' -e '^FAKEROOTKEY='
+ export | egrep -v -e '^declare -x SANDBOX_' \
+ -e '^declare -x LD_PRELOAD=' -e '^declare -x FAKEROOTKEY=' | \
+ sed 's:^declare -rx:declare -x:'
+ } > environment
+ )
bzip2 -f9 environment
cp "${EBUILD}" "${PF}.ebuild"