Bug 402511

Summary: When using the --stop-on-failure argument, print contents of log file for failed build to the console
Product: [Developer tools] kdesrc-build Reporter: Nate Graham <nate>
Component: generalAssignee: Michael Pyne <mpyne>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: ashark, mklapetek
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Nate Graham 2018-12-23 22:20:16 UTC
When you use --stop-on-failure and it stops because of failure, it will terminate with output like this:


Removing 7 out of 10 old log directories...

<<<  PACKAGES FAILED TO BUILD  >>>
kactivities - ~/kde/src/log/2018-12-23-09/kactivities/cmake.log
:-(
Your logs are saved in /home/nate/kde/src/log/2018-12-23-09


It would be nice if it printed the contents to the log for the failing build rather than making you go and open it yourself.

Bonus points if the failure is in CMake and it omits everything before the first occurrence of "CMake Error" in the log file.
Comment 1 Nate Graham 2018-12-27 23:05:04 UTC
Fixed in https://invent.kde.org/kde/kdesrc-build/merge_requests/2
Comment 2 Nate Graham 2018-12-27 23:27:32 UTC
Oops, closed the wrong bug.
Comment 3 Nate Graham 2019-09-09 20:31:09 UTC
I've been working around this by using the following shell function to run kdesrc-build:


# "kde build" just this repo and then set up variables
function kb {
    REPO=`basename $PWD`
    kdesrc-build $REPO --no-src --resume-from $REPO
    ERRORFILE=~/kde/src/log/latest/$REPO/error.log
    if [ -f $ERRORFILE ]
    then
        cat $ERRORFILE
    else
        source ../../build/$REPO/prefix.sh
    fi
}
Comment 4 Michael Pyne 2019-12-16 19:00:51 UTC
*** Bug 331203 has been marked as a duplicate of this bug. ***
Comment 5 Andrew Shark 2023-12-21 14:19:15 UTC
Currently, we have clickable file names in Konsole, so they are very easy to inspect.
And I think it is not worth it to clutter the terminal with the whole file output for each run.