Bug 402511 - When using the --stop-on-failure argument, print contents of log file for failed build to the console
Summary: When using the --stop-on-failure argument, print contents of log file for fai...
Status: CONFIRMED
Alias: None
Product: kdesrc-build
Classification: Unclassified
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Michael Pyne
URL:
Keywords:
: 331203 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-12-23 22:20 UTC by Nate Graham
Modified: 2019-12-16 19:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***