pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc The WRKDIR and PREFIX can be saved in the log director...
details: https://anonhg.NetBSD.org/pkgsrc/rev/85ff3faf65a2
branches: trunk
changeset: 533042:85ff3faf65a2
user: rillig <rillig%pkgsrc.org@localhost>
date: Fri Sep 07 15:51:53 2007 +0000
description:
The WRKDIR and PREFIX can be saved in the log directory when a package
doesn't build properly. These options are off by default since they
require much disk space.
diffstat:
mk/bsd.pkg.mk | 4 ++--
mk/pbulk/pbulk-index.mk | 5 ++++-
pkgtools/pbulk/files/pbulk/pbulk.conf | 9 ++++++++-
pkgtools/pbulk/files/pbulk/scripts/pkg-build | 8 +++++++-
4 files changed, 21 insertions(+), 5 deletions(-)
diffs (80 lines):
diff -r 8c6eec663415 -r 85ff3faf65a2 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Fri Sep 07 15:47:40 2007 +0000
+++ b/mk/bsd.pkg.mk Fri Sep 07 15:51:53 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1922 2007/08/18 00:30:21 joerg Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1923 2007/09/07 15:51:53 rillig Exp $
#
# This file is in the public domain.
#
@@ -801,7 +801,7 @@
${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET}
.endfor
-.if make(pbulk-index) || make(pbulk-index-item)
+.if make(pbulk-index) || make(pbulk-index-item) || make(pbulk-save-wrkdir)
.include "${.PARSEDIR}/pbulk/pbulk-index.mk"
.endif
diff -r 8c6eec663415 -r 85ff3faf65a2 mk/pbulk/pbulk-index.mk
--- a/mk/pbulk/pbulk-index.mk Fri Sep 07 15:47:40 2007 +0000
+++ b/mk/pbulk/pbulk-index.mk Fri Sep 07 15:51:53 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pbulk-index.mk,v 1.2 2007/05/16 16:48:12 joerg Exp $
+# $NetBSD: pbulk-index.mk,v 1.3 2007/09/07 15:51:53 rillig Exp $
# This Makefile fragment is included by bsd.pkg.mk and provides all
# variables and targets related to the parallel bulk build
@@ -99,3 +99,6 @@
.endfor
@printf "\n"
.endif
+
+pbulk-save-wrkdir:
+ ${PAX} -w -z -f ${INTO:Q} ${WRKDIR}
diff -r 8c6eec663415 -r 85ff3faf65a2 pkgtools/pbulk/files/pbulk/pbulk.conf
--- a/pkgtools/pbulk/files/pbulk/pbulk.conf Fri Sep 07 15:47:40 2007 +0000
+++ b/pkgtools/pbulk/files/pbulk/pbulk.conf Fri Sep 07 15:51:53 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: pbulk.conf,v 1.7 2007/08/24 06:32:41 rillig Exp $
+# $NetBSD: pbulk.conf,v 1.8 2007/09/07 15:51:53 rillig Exp $
# The URL where the build report will be made available. This is only
# used in the .txt version of the report.
@@ -78,6 +78,13 @@
presolve=@PREFIX@/bin/pbulk-resolve
pscan=@PREFIX@/bin/pbulk-scan
+# When a package build fails, it is often necessary to have a look at
+# the working directory or the installed files. When these options are
+# set to "yes", they will be archived in the log directory.
+#
+keep_wrkdir=no
+keep_prefix=no
+
pkg_up_to_date_script=@PREFIX@/libexec/pbulk/pkg-up-to-date
pbuild_script=@PREFIX@/libexec/pbulk/pkg-build
pbuild_start_script=@PREFIX@/libexec/pbulk/build-client-start
diff -r 8c6eec663415 -r 85ff3faf65a2 pkgtools/pbulk/files/pbulk/scripts/pkg-build
--- a/pkgtools/pbulk/files/pbulk/scripts/pkg-build Fri Sep 07 15:47:40 2007 +0000
+++ b/pkgtools/pbulk/files/pbulk/scripts/pkg-build Fri Sep 07 15:51:53 2007 +0000
@@ -1,5 +1,5 @@
#!@SH@
-# $NetBSD: pkg-build,v 1.4 2007/08/24 07:17:46 rillig Exp $
+# $NetBSD: pkg-build,v 1.5 2007/09/07 15:51:53 rillig Exp $
#
# Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
# All rights reserved.
@@ -33,6 +33,12 @@
. @PBULK_CONFIG@
cleanup() {
+ if [ $keep_wrkdir = yes ]; then
+ ${make} pbulk-save-wrkdir INTO=${bulklog}/${pkgname}/wrkdir.tar.gz
+ fi
+ if [ $keep_prefix = yes ]; then
+ tar cfz ${bulklog}/${pkgname}/prefix.tar.gz ${prefix}
+ fi
${make} clean > /dev/null 2>&1 || true
exit 1
}
Home |
Main Index |
Thread Index |
Old Index