packages: get_makepkg_env(): don't use host env, but provide standard PATH variable

This commit is contained in:
InsanePrawn 2022-09-04 03:46:28 +02:00
parent c3e4b5c108
commit b80f42d48a

View file

@ -32,11 +32,12 @@ pacman_cmd = [
def get_makepkg_env(arch: Optional[Arch] = None):
# has to be a function because calls to `config` must be done after config file was read
threads = config.file.build.threads or multiprocessing.cpu_count()
env = {key: val for key, val in os.environ.items() if not key.split('_', maxsplit=1)[0] in ['CI', 'GITLAB', 'FF']}
env |= {
# env = {key: val for key, val in os.environ.items() if not key.split('_', maxsplit=1)[0] in ['CI', 'GITLAB', 'FF']}
env = {
'LANG': 'C',
'CARGO_BUILD_JOBS': str(threads),
'MAKEFLAGS': f"-j{threads}",
'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
}
native = config.runtime.arch
assert native