mirror of
https://github.com/truenas/scale-build.git
synced 2025-12-24 21:07:00 +00:00
Allow specifying environment variables independently
This commit adds changes to allow specifying enviornment variables independently for each package. This is helpful to avoid influence of one env variable meant for a specific package on another which might result in changed behavior when it builds.
This commit is contained in:
@@ -19,8 +19,7 @@ class BuildPackageMixin:
|
||||
env={
|
||||
**os.environ,
|
||||
**APT_ENV,
|
||||
'CONFIG_DEBUG_INFO': 'Y', # Build kernel with debug symbols
|
||||
'CONFIG_LOCALVERSION': '+truenas',
|
||||
**self.env,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -71,7 +70,7 @@ class BuildPackageMixin:
|
||||
predep_cmd = predep_entry['command']
|
||||
skip_cmd = False
|
||||
for env_var in predep_entry['env_checks']:
|
||||
if os.environ.get(env_var['key']) != env_var['value']:
|
||||
if all(f(env_var['key']) != env_var['value'] for f in (os.environ.get, self.env.get)):
|
||||
self.logger.debug(
|
||||
'Skipping %r predep command because %r does not match %r',
|
||||
predep_cmd, env_var['key'], env_var['value']
|
||||
|
||||
Reference in New Issue
Block a user