diff --git a/bin/save-ebuild-env.sh b/bin/save-ebuild-env.sh index 3a2560aabf..e941017c31 100644 --- a/bin/save-ebuild-env.sh +++ b/bin/save-ebuild-env.sh @@ -24,6 +24,16 @@ __save_ebuild_env() { unset PYTHONPATH fi fi + + # These variables contains build host specific configuration. We + # want binpkgs generated on different sized hosts to be + # identical, so strip them from the binpkg. It's also not needed + # for installing / removing a package. + unset MAKEOPTS NINJAOPTS + + # These variables are constantly changing. Strip them so we + # don't introduce non-reproducible data into the binpkg. + unset EPOCHREALTIME EPOCHSECONDS SRANDOM fi # misc variables inherited from the calling environment diff --git a/lib/portage/package/ebuild/_config/special_env_vars.py b/lib/portage/package/ebuild/_config/special_env_vars.py index 1a66192c96..8a234007a4 100644 --- a/lib/portage/package/ebuild/_config/special_env_vars.py +++ b/lib/portage/package/ebuild/_config/special_env_vars.py @@ -112,7 +112,9 @@ "FEATURES", "FILESDIR", "HOME", + "MAKEOPTS", "MERGE_TYPE", + "NINJAOPTS", "NOCOLOR", "NO_COLOR", "P",