Skip to content

Commit 4715ed3

Browse files
author
Raul E Rangel
committed
save-build-env: Strip out MAKEOPTS and NINJAOPTS
MAKEOPTS and NINJAOPTS contains a host specific value. If the same package is built on a host with different core counts, the binpkgs will have different hashes. This change drops MAKEOPTS after src_install so that it's not included in final environment.gz. This change also adds them to the special_env_vars.py so that we always have the most up to date version of these variables. Bug: https://bugs.gentoo.org/914441 Bug: https://bugs.gentoo.org/736794 Signed-off-by: Raul E Rangel <[email protected]>
1 parent 08a2bc3 commit 4715ed3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Diff for: bin/save-ebuild-env.sh

+6
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ __save_ebuild_env() {
2424
unset PYTHONPATH
2525
fi
2626
fi
27+
28+
# These variables contains build host specific configuration. We
29+
# want binpkgs generated on different sized hosts to be
30+
# identical, so strip them from the binpkg. It's also not needed
31+
# for installing / removing a package.
32+
unset MAKEOPTS NINJAOPTS
2733
fi
2834

2935
# misc variables inherited from the calling environment

Diff for: lib/portage/package/ebuild/_config/special_env_vars.py

+2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@
112112
"FEATURES",
113113
"FILESDIR",
114114
"HOME",
115+
"MAKEOPTS",
115116
"MERGE_TYPE",
117+
"NINJAOPTS",
116118
"NOCOLOR",
117119
"NO_COLOR",
118120
"P",

0 commit comments

Comments
 (0)