Skip to content

Commit

Permalink
Allow to disable grepping logs for failure reason
Browse files Browse the repository at this point in the history
This takes a lot of time for no usable result in most cases
  • Loading branch information
AMDmi3 committed Nov 17, 2021
1 parent ae641ed commit 068a878
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/etc/poudriere.conf.sample
Expand Up @@ -365,3 +365,7 @@ DISTFILES_CACHE=/usr/ports/distfiles
# be fetched.
# Default: everything
#PACKAGE_FETCH_WHITELIST="gcc* rust llvm*"

# Grep build logs to determine a possible build failure reason.
# Default: yes
#DETERMINE_BUILD_FAILURE_REASON=yes
11 changes: 7 additions & 4 deletions src/share/poudriere/common.sh
Expand Up @@ -4968,7 +4968,7 @@ build_pkg() {
local failed_status failed_phase
local clean_rdepends
local log
local errortype
local errortype="???"
local ret=0
local elapsed now pkgname_varname jpkg originspec

Expand Down Expand Up @@ -5078,9 +5078,11 @@ build_pkg() {
# Symlink the buildlog into errors/
ln -s "../${pkgname}.log" \
"${log}/logs/errors/${pkgname}.log"
errortype=$(/bin/sh ${SCRIPTPREFIX}/processonelog.sh \
"${log}/logs/errors/${pkgname}.log" \
2> /dev/null)
if [ "${DETERMINE_BUILD_FAILURE_REASON}" = "yes" ]; then
errortype=$(/bin/sh ${SCRIPTPREFIX}/processonelog.sh \
"${log}/logs/errors/${pkgname}.log" \
2> /dev/null)
fi
badd ports.failed "${originspec} ${pkgname} ${failed_phase} ${errortype} ${elapsed}"
COLOR_ARROW="${COLOR_FAIL}" job_msg "${COLOR_FAIL}Finished ${COLOR_PORT}${port}${FLAVOR:+@${FLAVOR}} | ${pkgname}${COLOR_FAIL}: Failed: ${COLOR_PHASE}${failed_phase}"
run_hook pkgbuild failed "${port}" "${pkgname}" "${failed_phase}" \
Expand Down Expand Up @@ -8755,6 +8757,7 @@ fi
: ${FORCE_MOUNT_HASH:=no}
: ${DELETE_UNQUEUED_PACKAGES:=no}
: ${DELETE_UNKNOWN_FILES:=yes}
: ${DETERMINE_BUILD_FAILURE_REASON:=yes}
DRY_RUN=0
INTERACTIVE_MODE=0

Expand Down

0 comments on commit 068a878

Please sign in to comment.