Bug 391396

Summary: Missing error handling on compile error
Product: [Developer tools] kdesrc-build Reporter: David Faure <faure>
Component: generalAssignee: Michael Pyne <mpyne>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 18.04
Sentry Crash Report:

Description David Faure 2018-03-04 21:03:12 UTC
If you try building an autoconf-based module and configure fails (e.g. due to no automake-1.13 not being installed), kdesrc-build moves on to the next module but doesn't actually display any red line in the output to indicate an error happened.

Building libaccounts-glib (4/381)
        No source update, but the module has failed to build 10 times in a row
        Updating libaccounts-glib (to branch master)
        Source update complete for libaccounts-glib: no files affected
        Preparing build system for libaccounts-glib.
        Removing files in build directory for libaccounts-glib
        Old build system cleaned, starting new build system.
        Compiling...

Building <next module> etc.

Testcase:

include extragear/utils/kdesrc-build/custom-qt5-libs-build-include

Same bug with qmake-based modules.
Building libaccounts-qt (5/381)
        No source update, but the module has failed to build 10 times in a row
        Updating libaccounts-qt (to branch master)
        Source update complete for libaccounts-qt: no files affected
        Preparing build system for libaccounts-qt.
        Removing files in build directory for libaccounts-qt
        Old build system cleaned, starting new build system.
        Running qmake...
        Compiling...

Error handling is better with cmake, with an error like this:
        Unable to configure kdewebkit with CMake!
Comment 1 Michael Pyne 2018-03-06 04:33:37 UTC
Git commit 742d92ac938f9e30f8ccbdbcdea8a268be30aca0 by Michael Pyne.
Committed on 06/03/2018 at 04:33.
Pushed by mpyne into branch 'master'.

Don't shortcut build output for non-CMake build systems.

There is code to avoid using the TTY code that updates the status of the
build in the current line.  This code prevents using the fancy TTY stuff
if progress output is not supported, but doesn't actually ever output
the end result of the build (success or failure), which wasn't the
intent.

In the other situations we don't want to clutter the line output with a
redundant status.  Instead of duplicating the "progress output
supported" check later to output the status (or not), I just took out
the check for whether progress output is supported entirely, since the
progress callback can work even with build systems w/out support.
FIXED-IN:18.04

M  +4    -12   modules/ksb/BuildSystem.pm
M  +0    -5    modules/ksb/BuildSystem/KDE4.pm

https://commits.kde.org/kdesrc-build/742d92ac938f9e30f8ccbdbcdea8a268be30aca0