# 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.
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