Commit 33053d1b authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜
Browse files

cerbero: Use the correct env when entering shell

When a build fails and we enter the shell, we should use the env that
the recipe is using, not the env that is set globally on the config.

Part-of: <gstreamer/cerbero!480>
parent 98dae501
......@@ -229,6 +229,14 @@ class ModifyEnvBase:
if self._old_env:
raise RuntimeError('Do not modify the env inside @modify_environment, it will have no effect')
@modify_environment
def get_recipe_env(self):
'''
Used in oven.py to start a shell prompt with the correct env on recipe
build failure
'''
return self.env.copy()
def _save_env_var(self, var):
# Will only store the first 'save'.
if var not in self._old_env:
......
......@@ -414,7 +414,7 @@ class Oven (object):
msg += _("Select an action to proceed:")
action = shell.prompt_multiple(msg, RecoveryActions())
if action == RecoveryActions.SHELL:
environ = recipe.config.env.copy()
environ = recipe.get_recipe_env()
if recipe.use_system_libs:
add_system_libs(recipe.config, environ, environ)
shell.enter_build_environment(self.config.target_platform,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment