Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: bin/ebuild.sh

Issue 6733008: Optimize ebuild.sh to cache preprocessing output. (Closed)
Patch Set: Address review feedback from zmedico. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/ebuild.sh
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index 59bf46e918ada69bc8ab72568eeb02b68b65a2c1..c79d4c3d03ded25b70496a2b26ed66f89161545a 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1826,14 +1826,14 @@ filter_readonly_variables() {
# interfering with the current environment. This is useful when an existing
# environment needs to be loaded from a binary or installed package.
preprocess_ebuild_env() {
- local _portage_filter_opts=""
- if [ -f "${T}/environment.raw" ] ; then
- # This is a signal from the python side, indicating that the
- # environment may contain stale SANDBOX_{DENY,PREDICT,READ,WRITE}
- # and FEATURES variables that should be filtered out. Between
- # phases, these variables are normally preserved.
- _portage_filter_opts+=" --filter-features --filter-locale --filter-path --filter-sandbox"
- fi
+ local _portage_filter_opts="--filter-features --filter-locale --filter-path --filter-sandbox"
+
+ # If environment.raw is present, this is a signal from the python side,
+ # indicating that the environment may contain stale FEATURES and
+ # SANDBOX_{DENY,PREDICT,READ,WRITE} variables that should be filtered out.
+ # Otherwise, we don't need to filter the environment.
+ [ -f "${T}/environment.raw" ] || return 0
+
filter_readonly_variables $_portage_filter_opts < "${T}"/environment \
>> "$T/environment.filtered" || return $?
unset _portage_filter_opts
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698