From: Zac Medico Date: Mon, 19 Nov 2007 22:57:31 +0000 (-0000) Subject: Make save_ebuild_env() filter out lots of variables that X-Git-Tag: v2.2_pre1~373 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=421dfb7fd2a5cf3477cdbff802a11784472762f5;p=portage.git Make save_ebuild_env() filter out lots of variables that don't need to be saved. svn path=/main/trunk/; revision=8533 --- diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 653aacb22..023e3b0c6 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -1404,6 +1404,13 @@ preprocess_ebuild_env() { # echo the current environment to stdout, filtering out redundant info. save_ebuild_env() { ( + + # misc variables set by bash + unset BASH PWD SHELL + + # misc variables inherited from the calling environment + unset TERM + # There's no need to bloat environment.bz2 with internally defined # functions and variables, so filter them out if possible. @@ -1422,6 +1429,31 @@ save_ebuild_env() { newpdepend do_newdepend remove_path_entry killparent \ save_ebuild_env filter_readonly_variables preprocess_ebuild_env + # portage config variables and variables set directly by portage + unset ACCEPT_KEYWORDS AUTOCLEAN BAD BRACKET BUILD_PREFIX CLEAN_DELAY \ + COLLISION_IGNORE COLS CONFIG_PROTECT CONFIG_PROTECT_MASK \ + DISTCC_DIR DISTDIR DOC_SYMLINKS_DIR EBUILD_MASTER_PID \ + ECLASSDIR ECLASS_DEPTH EMERGE_DEFAULT_OPTS \ + EMERGE_WARNING_DELAY ENDCOL FEATURES \ + FETCHCOMMAND FETCHCOMMAND_FTP FETCHCOMMAND_HTTP FETCHCOMMAND_SFTP \ + GENTOO_MIRRORS GOOD HILITE HOME IMAGE LAST_E_CMD LAST_E_LEN \ + NORMAL O PATH PKGDIR PKGUSE PKG_LOGDIR PKG_TMPDIR \ + PORTAGE_ACTUAL_DISTDIR PORTAGE_ARCHLIST PORTAGE_BASHRC \ + PORTAGE_BINHOST_CHUNKSIZE PORTAGE_BUILDDIR PORTAGE_CALLER \ + PORTAGE_COLORMAP PORTAGE_CONFIGROOT \ + PORTAGE_DEPCACHEDIR PORTAGE_ELOG_CLASSES PORTAGE_ELOG_MAILFROM \ + PORTAGE_ELOG_MAILSUBJECT PORTAGE_ELOG_MAILURI PORTAGE_ELOG_SYSTEM \ + PORTAGE_GID PORTAGE_GPG_DIR PORTAGE_GPG_KEY PORTAGE_INST_GID \ + PORTAGE_INST_UID PORTAGE_LOG_FILE PORTAGE_MASTER_PID \ + PORTAGE_REPO_NAME PORTAGE_RSYNC_EXTRA_OPTS PORTAGE_RSYNC_OPTS \ + PORTAGE_RSYNC_RETRIES PORTAGE_TMPFS PORTAGE_WORKDIR_MODE PORTDIR \ + PORTDIR_OVERLAY PORT_LOGDIR PROFILE_PATHS PWORKDIR \ + QUICKPKG_DEFAULT_OPTS RC_DEFAULT_INDENT RC_DOT_PATTERN RC_ENDCOL \ + RC_INDENTATION RESUMECOMMAND RESUMECOMMAND_HTTP \ + RESUMECOMMAND_HTTP RESUMECOMMAND_SFTP ROOT RPMDIR \ + S STARTDIR SYNC TMP TMPDIR USE_EXPAND \ + USE_EXPAND_HIDDEN USE_ORDER WARN XARGS + set export ) | filter_readonly_variables