After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 752218 - --no-interact should not cause jhbuild to continue building all modules after a build failure
--no-interact should not cause jhbuild to continue building all modules after...
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
3.15.x
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
Depends on:
Blocks:
 
 
Reported: 2015-07-10 12:20 UTC by Michael Catanzaro
Modified: 2015-07-14 16:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add --exit-on-error option (3.34 KB, patch)
2015-07-10 18:57 UTC, Michael Catanzaro
none Details | Review
Add --exit-on-error option (3.43 KB, patch)
2015-07-10 19:06 UTC, Michael Catanzaro
committed Details | Review

Description Michael Catanzaro 2015-07-10 12:20:55 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)
Comment 1 Frederic Peters 2015-07-10 12:34:09 UTC
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).
Comment 2 Michael Catanzaro 2015-07-10 18:57:03 UTC
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
Comment 3 Michael Catanzaro 2015-07-10 19:06:05 UTC
Created attachment 307262 [details] [review]
Add --exit-on-error option

Alternative patch
Comment 4 Michael Catanzaro 2015-07-13 22:11:43 UTC
Frederic, do either of these look OK? I think I prefer the second approach (so the new option works on all frontends).
Comment 5 Frederic Peters 2015-07-14 11:34:55 UTC
The second patch is fine; it would be nice to have a few words added to doc/C/index.docbook.
Comment 6 Michael Catanzaro 2015-07-14 16:15:01 UTC
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