diff options
author | hubertf <hubertf@pkgsrc.org> | 2000-09-02 13:53:06 +0000 |
---|---|---|
committer | hubertf <hubertf@pkgsrc.org> | 2000-09-02 13:53:06 +0000 |
commit | 94e6e8bd17c2354bcfe615efaf5812cd4f589bb6 (patch) | |
tree | 7f7e4691bf3d199d89f123ff82d7b6669b249b44 /mk | |
parent | 994b2322d1d2c5aec4cbeea8f55ac5f668bc85be (diff) | |
download | pkgsrc-94e6e8bd17c2354bcfe615efaf5812cd4f589bb6.tar.gz |
log more stuff to buildlog
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bulk/bsd.bulk-pkg.mk | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/mk/bulk/bsd.bulk-pkg.mk b/mk/bulk/bsd.bulk-pkg.mk index 4b4e00ba9e3..63bfcdabb4c 100644 --- a/mk/bulk/bsd.bulk-pkg.mk +++ b/mk/bulk/bsd.bulk-pkg.mk @@ -1,4 +1,4 @@ -# $Id: bsd.bulk-pkg.mk,v 1.12 2000/08/25 12:43:28 dmcmahill Exp $ +# $Id: bsd.bulk-pkg.mk,v 1.13 2000/09/02 13:53:06 hubertf Exp $ # # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf@netbsd.org> @@ -102,19 +102,21 @@ bulk-check-uptodate: # rebuild binpkg if any of the pkg files is newer than the binary archive # set DO to ":" to not actually do anything (debugging, ...) bulk-package: - @if [ "${KEEP}" = "no" ]; then \ + @if [ -f ${BROKENFILE} ]; then \ + ${ECHO_MSG} "BULK> *** Package ${PKGNAME} seems broken and needs attention:" ; \ + ${LS} -la ${BROKENFILE}; \ + exit 1; \ + fi + @( \ + if [ "${KEEP}" = "no" ]; then \ ${ECHO_MSG} '' ; \ ${ECHO_MSG} '' ; \ ${ECHO_MSG} '###' ; \ ${ECHO_MSG} '### ${MAKE} ${.TARGET} for ${PKGNAME}' ; \ ${ECHO_MSG} '### Current pkg count: ' `${LS} -l ${PKG_DBDIR} | ${GREP} ^d | wc -l` installed packages: `${LS} ${PKG_DBDIR} | ${GREP} -v pkgdb.byfile.db`; \ ${ECHO_MSG} '###' ; \ - fi - @if [ -f ${BROKENFILE} ]; then \ - ${ECHO_MSG} "BULK> *** Package ${PKGNAME} seems broken and needs attention:" ; \ - ${LS} -la ${BROKENFILE}; \ - exit 1; \ - fi + fi \ + ) 2>&1 | tee -a ${BUILDLOG} @uptodate=`${MAKE} ${MAKEFLAGS} bulk-check-uptodate REF=${PKGFILE}` ; \ if ${PKG_INFO} -qe "${PKGNAME:C/-[^-]*$/-[0-9]*/}" ; then \ installed=1; \ @@ -122,16 +124,17 @@ bulk-package: installed=0; \ fi ; \ if [ $$uptodate = 1 ]; then \ - if [ $$installed = 1 ]; then \ + ( if [ $$installed = 1 ]; then \ echo "BULK> Package ${PKGNAME} is upto-date, and still installed" ; \ echo " removing installed package." ; \ ${ECHO_MSG} ${MAKE} deinstall DEINSTALLDEPENDS=YES ; \ ${DO} ${MAKE} deinstall DEINSTALLDEPENDS=YES ; \ else \ echo "BULK> Nothing to be done." ; \ - fi ; \ + fi \ + ) 2>&1 | tee -a ${BUILDLOG}; \ else \ - if [ $$installed = 1 ]; then \ + ( if [ $$installed = 1 ]; then \ echo "BULK> Removing outdated (installed) package ${PKGNAME} first." ; \ ${ECHO_MSG} ${MAKE} deinstall DEINSTALLDEPENDS=YES ; \ ${DO} ${MAKE} deinstall DEINSTALLDEPENDS=YES ; \ @@ -146,18 +149,21 @@ bulk-package: ${ECHO_MSG} ${MAKE} -k clean CLEANDEPENDS=YES ; \ ${DO} ${MAKE} -k clean CLEANDEPENDS=YES ; \ fi ; \ - ${ECHO_MSG} ${MAKE} install-depends '(${PKGNAME})' 2>&1 | tee -a ${BUILDLOG}; \ - ${DO} ( ${MAKE} install-depends 2>&1 | tee -a ${BUILDLOG} ) || true; \ - ${ECHO_MSG} ${MAKE} package '(${PKGNAME})' 2>&1 | tee -a ${BUILDLOG}; \ - ${DO} ( ${MAKE} package 2>&1 | tee -a ${BUILDLOG} ) || true; \ + ${ECHO_MSG} ${MAKE} install-depends '(${PKGNAME})' 2>&1; \ + ${DO} ( ${MAKE} install-depends 2>&1 ); \ + ${ECHO_MSG} ${MAKE} package '(${PKGNAME})' 2>&1 ; \ + ${DO} ( ${MAKE} package 2>&1 ); \ + ) 2>&1 | tee -a ${BUILDLOG} ; \ if [ -f ${PKGFILE} ]; then \ - ${RM} ${BUILDLOG} ; \ + echo ${RM} ${BUILDLOG} ; \ else \ + ( \ ${MV} ${BUILDLOG} ${BROKENFILE} ; \ ${ECHO_MSG} "BULK> ${PKGNAME} was marked as broken:" ; \ ${LS} -la ${BROKENFILE} ; \ nerrors=`${GREP} '^\*\*\* Error code' ${BROKENFILE} | ${WC} -l`; \ ${ECHO_MSG} "$$nerrors ${PKGPATH}/${BROKENFILE}" >>../../${BROKENFILE}; \ + ) 2>&1 | tee -a ${BUILDLOG}; \ fi ; \ ${ECHO_MSG} ${MAKE} clean CLEANDEPENDS=YES ; \ ${DO} ${MAKE} clean CLEANDEPENDS=YES ; \ @@ -169,7 +175,7 @@ bulk-package: fi ; \ fi @if [ ! -f ${PKGFILE} ]; then \ - ${ECHO_MSG} "BULK>" Build for ${PKGNAME} was not successful, aborting. ; \ + ${ECHO_MSG} "BULK>" Build for ${PKGNAME} was not successful, aborting. | tee -a ${BUILDLOG} ; \ false; \ fi |