diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-04-19 11:22:32 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-04-19 11:22:32 +0200 |
commit | 8b3ecdf1f4f120878a43da89afeed62533acb6c4 (patch) | |
tree | b4329763c6d25f4b0cdc72585a779fd7e71a5b7e /abuild.in | |
parent | 074f43536dbd5bc05f80fcfdb9c72b9048a9a00c (diff) | |
download | abuild-8b3ecdf1f4f120878a43da89afeed62533acb6c4.tar.gz abuild-8b3ecdf1f4f120878a43da89afeed62533acb6c4.tar.bz2 abuild-8b3ecdf1f4f120878a43da89afeed62533acb6c4.tar.xz abuild-8b3ecdf1f4f120878a43da89afeed62533acb6c4.zip |
abuild: add support for optional remote logging
via ABUILD_LOG_CMD config option
This is supposed to be used on the build servers
Diffstat (limited to 'abuild.in')
-rwxr-xr-x | abuild.in | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -5,7 +5,7 @@ # # Distributed under GPL-2 # -# Depends on: busybox utilities, fakeroot, +# Depends on: busybox utilities, fakeroot # abuild_ver=@VERSION@ @@ -52,8 +52,13 @@ monochrome() { #colors if [ -n "$USE_COLORS" ]; then default_colors -fi - +fi + +# run optional log command for remote logging +logcmd() { + ${ABUILD_LOG_CMD:-true} "$@" + return 0 +} # functions msg() { @@ -87,6 +92,7 @@ error() { local fake="${FAKEROOTKEY:+${BLUE}*${NORMAL}}" local name="${STRONG}${subpkgname:-$pkgname}${NORMAL}" printf "${prompt} ${name}${fake}: %s\n" "$1" >&2 + logcmd "ERROR: $pkgname: $1" } error2() { @@ -1161,6 +1167,7 @@ mklinks_abuildrepo() { build_abuildrepo() { local d apk if ! apk_up2date || [ -n "$force" ]; then + logcmd "building $pkgname" sanitycheck && builddeps && clean && fetch && unpack \ && prepare && mkusers && rootpkg || return 1 fi |