diff options
author | Loïc Minier <lool@dooz.org> | 2009-12-12 16:16:00 +0100 |
---|---|---|
committer | Loïc Minier <lool@dooz.org> | 2009-12-12 16:16:00 +0100 |
commit | cca6306f82e354cb8b42f88f5cde2747110d602c (patch) | |
tree | de7fd3af31677cfe7aa0e65826dc585237bb01d9 | |
parent | 4639b8e84cf47899655bbe9f04279493ed99ee01 (diff) | |
download | pbuilder-cca6306f82e354cb8b42f88f5cde2747110d602c.tar pbuilder-cca6306f82e354cb8b42f88f5cde2747110d602c.tar.gz |
Log dpkg-buildpackage command lines
-rwxr-xr-x | pbuilder-buildpackage | 7 | ||||
-rw-r--r-- | pdebuild-internal | 4 | ||||
-rw-r--r-- | pdebuild-user-mode-linux | 4 |
3 files changed, 12 insertions, 3 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index e13380d..c386628 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -120,7 +120,12 @@ DPKG_COMMANDLINE="dpkg-buildpackage -us -uc ${DEBEMAIL:+\"-e$DEBEMAIL\"} $DEBBUI ( : Build process - echo "cd tmp/buildd/*/ && ${DPKG_COMMANDLINE}${TWICE:+ && ${DPKG_COMMANDLINE}}" | $CHROOTEXEC $SUTOUSER + if [ -n "$TWICE" ]; then + DPKG_COMMANDLINE="$DPKG_COMMANDLINE && $DPKG_COMMANDLINE" + fi + DPKG_COMMANDLINE="cd tmp/buildd/*/ && $DPKG_COMMANDLINE" + log "I: Running $DPKG_COMMANDLINE" + echo "$DPKG_COMMANDLINE" | $CHROOTEXEC $SUTOUSER ) & BUILD_PID=$! if [ -n "${TIMEOUT_TIME}" ]; then diff --git a/pdebuild-internal b/pdebuild-internal index 9c41931..948f6b6 100644 --- a/pdebuild-internal +++ b/pdebuild-internal @@ -119,9 +119,11 @@ executehooks "A" # do build with that user. export DEBBUILDOPTS +CMD="/usr/bin/dpkg-buildpackage -rfakeroot -us -uc '\${DEBBUILDOPTS}'" +echo "I: Running $CMD" # This command should be ran with current directory as bind-mounted # package source directory -if echo /usr/bin/dpkg-buildpackage -rfakeroot -us -uc '${DEBBUILDOPTS}' | \ +if echo "$CMD" | \ su -p pbuser; then # build was successful diff --git a/pdebuild-user-mode-linux b/pdebuild-user-mode-linux index c87aff0..daab151 100644 --- a/pdebuild-user-mode-linux +++ b/pdebuild-user-mode-linux @@ -46,7 +46,9 @@ else if ! dpkg-checkbuilddeps -B; then echo "W: Unmet build-dependency in source" >&2 fi - echo "dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS" | /bin/bash + CMD="dpkg-buildpackage -S -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS" + echo "I: Running $CMD" >&2 + echo "$CMD" | /bin/bash pbuilder-user-mode-linux build "$@" --buildresult "${UML_BUILDRESULT}" ../"${PKG_SOURCENAME}_${PKG_VERSION}".dsc fi |