1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-26 09:56:13 +01:00

Print a hint to clean the build root after a failed build

This commit is contained in:
Daniel Mach 2023-09-29 09:53:59 +02:00
parent 41ce932673
commit a33d4c2d41

View File

@ -1510,7 +1510,12 @@ def main(apiurl, store, opts, argv):
rc = run_external(cmd[0], *cmd[1:]) rc = run_external(cmd[0], *cmd[1:])
if rc: if rc:
print() print()
print('The buildroot was:', build_root) print(f"Build failed with exit code {rc}")
print(f"The buildroot was: {build_root}")
print()
print("Cleaning the build root may fix the problem or allow you to start debugging from a well-defined state:")
print(" - add '--clean' option to your 'osc build' command")
print(" - run 'osc wipe [--vm-type=...]' prior running your 'osc build' command again")
sys.exit(rc) sys.exit(rc)
except KeyboardInterrupt as keyboard_interrupt_exception: except KeyboardInterrupt as keyboard_interrupt_exception:
print("keyboard interrupt, killing build ...") print("keyboard interrupt, killing build ...")