Date: 2005-08-03 Initial Package Version: 2.9.6 Origin: Marcus Habermehl Description: Adds logging support to makepkg. doc/makepkg.8.in | 3 +++ scripts/makepkg | 17 ++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff -Naur pacman-2.9.6.orig/doc/makepkg.8.in pacman-2.9.6/doc/makepkg.8.in --- pacman-2.9.6.orig/doc/makepkg.8.in 2004-08-04 07:57:17.000000000 +0200 +++ pacman-2.9.6/doc/makepkg.8.in 2005-08-27 16:09:57.000000000 +0200 @@ -362,6 +362,9 @@ Sets MAKEFLAGS="-j" before building the package. This is useful for overriding the MAKEFLAGS setting in /etc/makepkg.conf. .TP +.B "\-k, \-\-logging" +Logging package build process +.TP .B "\-m, \-\-nocolor" Disable color in output messages .TP diff -Naur pacman-2.9.6.orig/scripts/makepkg pacman-2.9.6/scripts/makepkg --- pacman-2.9.6.orig/scripts/makepkg 2005-06-10 22:54:29.000000000 +0200 +++ pacman-2.9.6/scripts/makepkg 2005-08-27 16:09:57.000000000 +0200 @@ -185,6 +185,7 @@ echo " -h, --help This help" echo " -i, --install Install package after successful build" echo " -j Set MAKEFLAGS to \"-j\" before building" + echo " -k, --logging Logging package build process" echo " -m, --nocolor Disable colorized output messages" echo " -n, --nostrip Do not strip binaries/libraries" echo " -o, --nobuild Download and extract files only" @@ -212,6 +213,7 @@ NOSTRIP=0 NOBUILD=0 RMDEPS=0 +LOGGING=0 BUILDSCRIPT="./PKGBUILD" ARGLIST=$@ @@ -231,6 +233,7 @@ --nocolor) USE_COLOR="n" ;; --genmd5) GENMD5=1 ;; --rmdeps) RMDEPS=1 ;; + --logging) LOGGING=1 ;; --help) usage exit 0 @@ -240,7 +243,7 @@ exit 1 ;; -*) - while getopts "cCsbdehifgj:mnorp:w:-" opt; do + while getopts "cCsbdehifgj:kmnorp:w:-" opt; do case $opt in c) CLEANUP=1 ;; C) CLEANCACHE=1 ;; @@ -255,6 +258,7 @@ ;; i) INSTALL=1 ;; j) export MAKEFLAGS="-j$OPTARG" ;; + k) LOGGING=1 ;; m) USE_COLOR="n" ;; n) NOSTRIP=1 ;; o) NOBUILD=1 ;; @@ -557,8 +561,9 @@ # build msg "Starting build()..." -build 2>&1 -if [ $? -gt 0 ]; then +BUILDLOG=${startdir}/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log +build 2>&1 | tee "${BUILDLOG}" +if [ ${PIPESTATUS[0]} -gt 0 ]; then error "Build Failed. Aborting..." exit 2 fi @@ -690,6 +695,12 @@ pacman -R $makedeplist $deplist fi +# remove build log +if [ "${LOGGING}" == "0" ] ; then + msg "Removing build log..." + rm -f "${BUILDLOG}" +fi + msg "Finished making: $pkgname (`date`)" if [ "$INSTALL" = "1" -a "`id -u`" = "0" -a "$INFAKEROOT" != "1" ]; then