1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-25 17:36: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:])
if rc:
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)
except KeyboardInterrupt as keyboard_interrupt_exception:
print("keyboard interrupt, killing build ...")