Skip to content

Commit 068a878

Browse files
committed
Allow to disable grepping logs for failure reason
This takes a lot of time for no usable result in most cases
1 parent ae641ed commit 068a878

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

src/etc/poudriere.conf.sample

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,3 +365,7 @@ DISTFILES_CACHE=/usr/ports/distfiles
365365
# be fetched.
366366
# Default: everything
367367
#PACKAGE_FETCH_WHITELIST="gcc* rust llvm*"
368+
369+
# Grep build logs to determine a possible build failure reason.
370+
# Default: yes
371+
#DETERMINE_BUILD_FAILURE_REASON=yes

src/share/poudriere/common.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4968,7 +4968,7 @@ build_pkg() {
49684968
local failed_status failed_phase
49694969
local clean_rdepends
49704970
local log
4971-
local errortype
4971+
local errortype="???"
49724972
local ret=0
49734973
local elapsed now pkgname_varname jpkg originspec
49744974

@@ -5078,9 +5078,11 @@ build_pkg() {
50785078
# Symlink the buildlog into errors/
50795079
ln -s "../${pkgname}.log" \
50805080
"${log}/logs/errors/${pkgname}.log"
5081-
errortype=$(/bin/sh ${SCRIPTPREFIX}/processonelog.sh \
5082-
"${log}/logs/errors/${pkgname}.log" \
5083-
2> /dev/null)
5081+
if [ "${DETERMINE_BUILD_FAILURE_REASON}" = "yes" ]; then
5082+
errortype=$(/bin/sh ${SCRIPTPREFIX}/processonelog.sh \
5083+
"${log}/logs/errors/${pkgname}.log" \
5084+
2> /dev/null)
5085+
fi
50845086
badd ports.failed "${originspec} ${pkgname} ${failed_phase} ${errortype} ${elapsed}"
50855087
COLOR_ARROW="${COLOR_FAIL}" job_msg "${COLOR_FAIL}Finished ${COLOR_PORT}${port}${FLAVOR:+@${FLAVOR}} | ${pkgname}${COLOR_FAIL}: Failed: ${COLOR_PHASE}${failed_phase}"
50865088
run_hook pkgbuild failed "${port}" "${pkgname}" "${failed_phase}" \
@@ -8755,6 +8757,7 @@ fi
87558757
: ${FORCE_MOUNT_HASH:=no}
87568758
: ${DELETE_UNQUEUED_PACKAGES:=no}
87578759
: ${DELETE_UNKNOWN_FILES:=yes}
8760+
: ${DETERMINE_BUILD_FAILURE_REASON:=yes}
87588761
DRY_RUN=0
87598762
INTERACTIVE_MODE=0
87608763

0 commit comments

Comments
 (0)