diff options
author | Matthew Smith <matthew@gentoo.org> | 2022-10-17 18:52:12 +0100 |
---|---|---|
committer | Matthew Smith <matthew@gentoo.org> | 2022-11-25 08:55:35 +0000 |
commit | 7e8083cd0516d7ea15e0e7e735abfceaa1e9d08b (patch) | |
tree | 9c8d644901feff66c1c106ca004f5489741390a6 /eclass | |
parent | waf-utils.eclass: set --jobs=1 for configure and install (diff) | |
download | gentoo-7e8083cd0516d7ea15e0e7e735abfceaa1e9d08b.tar.gz gentoo-7e8083cd0516d7ea15e0e7e735abfceaa1e9d08b.tar.bz2 gentoo-7e8083cd0516d7ea15e0e7e735abfceaa1e9d08b.zip |
waf-utils.eclass: set PYTHONHASHSEED environment variable
waf relies on Python set order, so let's make it consistent to avoid
brittle builds.
Added into existing phase functions instead of pkg_setup to retain
compatibility with existing ebuilds.
Signed-off-by: Matthew Smith <matthew@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/waf-utils.eclass | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass index 66041fc3f60e..3ff74db0d796 100644 --- a/eclass/waf-utils.eclass +++ b/eclass/waf-utils.eclass @@ -95,6 +95,7 @@ waf-utils_src_configure() { tc-export AR CC CPP CXX RANLIB local CMD=( + PYTHONHASHSEED=1 CCFLAGS="${CFLAGS}" LINKFLAGS="${CFLAGS} ${LDFLAGS}" PKGCONFIG="$(tc-getPKG_CONFIG)" @@ -119,6 +120,8 @@ waf-utils_src_compile() { local _mywafconfig [[ ${WAF_VERBOSE} == ON ]] && _mywafconfig="--verbose" + export PYTHONHASHSEED=1 + local jobs="--jobs=$(makeopts_jobs)" echo "\"${WAF_BINARY}\" build ${_mywafconfig} ${jobs} ${*}" "${WAF_BINARY}" ${_mywafconfig} ${jobs} "${@}" || die "build failed" @@ -130,6 +133,8 @@ waf-utils_src_compile() { waf-utils_src_install() { debug-print-function ${FUNCNAME} "$@" + export PYTHONHASHSEED=1 + echo "\"${WAF_BINARY}\" --jobs=1 --destdir=\"${D}\" ${*} install" "${WAF_BINARY}" --jobs=1 --destdir="${D}" "${@}" install || die "Make install failed" |