ostbuild: Make --shell-on-failure flag to work
Fixes an issue which would cause ostbuild to fail to spawn the debug shell and print a traceback instead.
This commit is contained in:
parent
0597a3f71c
commit
5835bb72b4
|
|
@ -54,10 +54,10 @@ class OstbuildBuildComponents(builtins.Builtin):
|
||||||
'--snapshot=' + self.snapshot_path])
|
'--snapshot=' + self.snapshot_path])
|
||||||
return args
|
return args
|
||||||
|
|
||||||
def _launch_debug_shell(self, architecture, buildroot, cwd=None):
|
def _launch_debug_shell(self, architecture, component, cwd=None):
|
||||||
args = self._get_ostbuild_chroot_args(architecture)
|
args = self._get_ostbuild_chroot_args(architecture)
|
||||||
args.extend(['--buildroot=' + buildroot,
|
args.extend(['--arch=' + architecture,
|
||||||
'--workdir=' + self.workdir,
|
'--name=' + component,
|
||||||
'--debug-shell'])
|
'--debug-shell'])
|
||||||
run_sync(args, cwd=cwd, fatal_on_error=False, keep_stdin=True)
|
run_sync(args, cwd=cwd, fatal_on_error=False, keep_stdin=True)
|
||||||
fatal("Exiting after debug shell")
|
fatal("Exiting after debug shell")
|
||||||
|
|
@ -137,7 +137,7 @@ class OstbuildBuildComponents(builtins.Builtin):
|
||||||
if self.buildopts.shell_on_failure:
|
if self.buildopts.shell_on_failure:
|
||||||
ecode = run_sync_monitor_log_file(chroot_args, log_path, cwd=component_src, fatal_on_error=False)
|
ecode = run_sync_monitor_log_file(chroot_args, log_path, cwd=component_src, fatal_on_error=False)
|
||||||
if ecode != 0:
|
if ecode != 0:
|
||||||
self._launch_debug_shell(architecture, buildroot_name, cwd=component_src)
|
self._launch_debug_shell(architecture, basename, cwd=component_src)
|
||||||
else:
|
else:
|
||||||
run_sync_monitor_log_file(chroot_args, log_path, cwd=component_src)
|
run_sync_monitor_log_file(chroot_args, log_path, cwd=component_src)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue