GNOME Bugzilla – Bug 752218
--no-interact should not cause jhbuild to continue building all modules after a build failure
Last modified: 2015-07-14 16:15:05 UTC
We use jhbuild --no-interact in WebKit and are mostly happy with it, except when any module fails to build, we want jhbuild to exit immediately rather than continuing to attempt build all subsequent modules that do not depend on the failed module. I can't think of any reason the current behavior would be desirable, so maybe we could use this patch from Carlos Lopez: --- a/jhbuild/frontends/terminal.py +++ b/jhbuild/frontends/terminal.py @@ -304,7 +304,7 @@ class TerminalBuildScript(buildscript.BuildScript): self.triedcheckout = None if not self.config.interact: - return 'fail' + sys.exit(1) while True: print uprint(' [1] %s' % _('Rerun phase %s') % phase)
The option is used in other circumstances where the goal is to go on building after a failure; for your use case, I would suggest another option (like --exit-on-error).
Created attachment 307260 [details] [review] Add --exit-on-error option This option tells jhbuild to stop building immediately if a module fails when running in noninteractive mode. Based on a patch by Carlos Lopez
Created attachment 307262 [details] [review] Add --exit-on-error option Alternative patch
Frederic, do either of these look OK? I think I prefer the second approach (so the new option works on all frontends).
The second patch is fine; it would be nice to have a few words added to doc/C/index.docbook.
OK, I added some documentation to the second patch and pushed it. I also tried to move the command from the global jhbuild options to the options for just the build command, since that's the only place where it's used, but failed for some reason (I couldn't make the option parser work, no clue why). We might want to do that in the future (or not, since it could conceivably be used by other commands). Attachment 307262 [details] pushed as f524fbe - Add --exit-on-error option