libkas: Remove parameters from get_build_environ()
All of them can be retrieved from the global context. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
448107781e
commit
7937c1963e
@ -149,7 +149,7 @@ class SetupEnviron(Command):
|
|||||||
return 'setup_environ'
|
return 'setup_environ'
|
||||||
|
|
||||||
def execute(self, ctx):
|
def execute(self, ctx):
|
||||||
ctx.environ.update(get_build_environ(ctx, ctx.build_dir))
|
ctx.environ.update(get_build_environ())
|
||||||
|
|
||||||
|
|
||||||
class WriteBBConfig(Command):
|
class WriteBBConfig(Command):
|
||||||
|
@ -210,7 +210,7 @@ def repos_apply_patches(config, repos):
|
|||||||
sys.exit(task.result())
|
sys.exit(task.result())
|
||||||
|
|
||||||
|
|
||||||
def get_build_environ(context, build_dir):
|
def get_build_environ():
|
||||||
"""
|
"""
|
||||||
Create the build environment variables.
|
Create the build environment variables.
|
||||||
"""
|
"""
|
||||||
@ -220,7 +220,7 @@ def get_build_environ(context, build_dir):
|
|||||||
|
|
||||||
init_repo = None
|
init_repo = None
|
||||||
permutations = \
|
permutations = \
|
||||||
[(repo, script) for repo in context.config.get_repos()
|
[(repo, script) for repo in get_context().config.get_repos()
|
||||||
for script in ['oe-init-build-env', 'isar-init-build-env']]
|
for script in ['oe-init-build-env', 'isar-init-build-env']]
|
||||||
for (repo, script) in permutations:
|
for (repo, script) in permutations:
|
||||||
if os.path.exists(repo.path + '/' + script):
|
if os.path.exists(repo.path + '/' + script):
|
||||||
@ -248,7 +248,7 @@ def get_build_environ(context, build_dir):
|
|||||||
env = {}
|
env = {}
|
||||||
env['PATH'] = '/usr/sbin:/usr/bin:/sbin:/bin'
|
env['PATH'] = '/usr/sbin:/usr/bin:/sbin:/bin'
|
||||||
|
|
||||||
(_, output) = run_cmd([get_bb_env_file, build_dir],
|
(_, output) = run_cmd([get_bb_env_file, get_context().build_dir],
|
||||||
cwd=init_repo.path, env=env, liveupdate=False)
|
cwd=init_repo.path, env=env, liveupdate=False)
|
||||||
|
|
||||||
os.remove(get_bb_env_file)
|
os.remove(get_bb_env_file)
|
||||||
@ -261,7 +261,7 @@ def get_build_environ(context, build_dir):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
conf_env = context.config.get_environment()
|
conf_env = get_context().config.get_environment()
|
||||||
|
|
||||||
env_vars = ['SSTATE_DIR', 'DL_DIR', 'TMPDIR']
|
env_vars = ['SSTATE_DIR', 'DL_DIR', 'TMPDIR']
|
||||||
env_vars.extend(conf_env)
|
env_vars.extend(conf_env)
|
||||||
|
Loading…
Reference in New Issue
Block a user