aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--debian/changelog8
-rw-r--r--pdebuild7
-rw-r--r--pdebuild-checkparams3
-rw-r--r--pdebuild.16
5 files changed, 29 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index afacfc3..0a30246 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2007-05-27 Junichi Uekawa <dancer@debian.org>
+ * pdebuild.1: document the new behavior.
+
+ * pdebuild: create ../pkg_ver_arch.build file per default,
+ matching debuild.
+
+ * pdebuild-checkparams (BASEBUILDPLACE): use
+ "${PBUILDER_BUILD_LOGFILE}" variable
+
* testsuite/run-test.sh: process logs to reduce diff.
* pbuilder-buildpackage:
diff --git a/debian/changelog b/debian/changelog
index 0a6a655..1b182bd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,13 +9,17 @@ pbuilder (0.167) UNRELEASED; urgency=low
Source-Version, according to http://wiki.debian.org/binNMU
* Use 'tee' to show output even in logged mode.
* trap SIGHUP as well as exit.
-
+ * Improve log file support thanks to request from Russ Allbery
+ (Closes: #424717).
+ - pdebuild will create .build file in similar manner to debuild command
+ - output is tee'd to terminal and also the logfile.
+
[ Loic Minier ]
* Tune aptitude opts in pbuilder-satisfydepends-aptitude to handle complex
dependencies in experimental, to support unsigned APT repositories, and to
not install Recommends.
- -- Junichi Uekawa <dancer@debian.org> Sun, 27 May 2007 02:51:32 +0900
+ -- Junichi Uekawa <dancer@debian.org> Sun, 27 May 2007 13:12:28 +0900
pbuilder (0.166) unstable; urgency=low
diff --git a/pdebuild b/pdebuild
index c29e61f..882ad2b 100644
--- a/pdebuild
+++ b/pdebuild
@@ -34,6 +34,13 @@ PKG_VERSION=$(dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p')
ARCHITECTURE=$(dpkg-architecture -qDEB_HOST_ARCH)
CHANGES="${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.changes"
+if [ -z "${PBUILDER_BUILD_LOGFILE}" ]; then
+ PBUILDER_BUILD_LOGFILE="../${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.build"
+ exec > >(tee "${PBUILDER_BUILD_LOGFILE}");
+ exec 2>&1
+fi
+
+
export BUILDRESULTUID=$(id -u)
export BUILDRESULTGID=$(id -g)
diff --git a/pdebuild-checkparams b/pdebuild-checkparams
index e03808f..2c003d0 100644
--- a/pdebuild-checkparams
+++ b/pdebuild-checkparams
@@ -22,6 +22,8 @@
. /usr/lib/pbuilder/pbuilder-loadconfig
. /usr/lib/pbuilder/pbuilder-modules
+PBUILDER_BUILD_LOGFILE=
+
while [ -n "$1" ]; do
case "$1" in
# pbuilder-shared options.
@@ -84,6 +86,7 @@ while [ -n "$1" ]; do
;;
--logfile)
echo " -> Logging to $2"
+ PBUILDER_BUILD_LOGFILE=$(readlink -f $2)
exec > >(tee "$2");
exec 2>&1
shift; shift;
diff --git a/pdebuild.1 b/pdebuild.1
index ef45bb5..872c1cf 100644
--- a/pdebuild.1
+++ b/pdebuild.1
@@ -13,6 +13,10 @@ One must be inside the source tree containing the
.B "debian"
directory, in order to make it work.
+By default, build log file is stored in
+../<package>_<version>_<arch>.build.
+
+
.SH "PDEBUILD OPTIONS"
The first option is always the operation to be done.
@@ -93,7 +97,7 @@ from the build scripts.
.TP
.BI "\-\-logfile [" "file to log" "]"
-Specifies the logfile to create.
+Specifies the build logfile to create.
The messages generated during execution will be written to the file,
as well as standard output.