[pbuilder] 04/04: pdebuild: Use dpkg-source to build dsc; generate changes if .. is not BUILDRESULT
James Clarke
jrtc27 at moszumanska.debian.org
Tue Jan 10 17:03:40 UTC 2017
This is an automated email from the git hooks/post-receive script.
jrtc27 pushed a commit to branch wip/source-only-changes
in repository pbuilder.
commit 2bad8426638f1a8c606506b34cd19bd484be9d8d
Author: James Clarke <jrtc27 at jrtc27.com>
Date: Tue Jan 10 17:03:04 2017 +0000
pdebuild: Use dpkg-source to build dsc; generate changes if .. is not BUILDRESULT
---
pdebuild | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/pdebuild b/pdebuild
index 41e7819..096aaa4 100644
--- a/pdebuild
+++ b/pdebuild
@@ -38,6 +38,7 @@ PKG_VERSION=$(dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p')
ARCHITECTURE="${ARCHITECTURE:-$(dpkg-architecture -qDEB_HOST_ARCH)}"
CHANGES="${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.changes"
SOURCE_CHANGES="${PKG_SOURCENAME}_${PKG_VERSION}_source.changes"
+DSC="${PKG_SOURCENAME}_${PKG_VERSION}.dsc"
if [ -z "${PBUILDER_BUILD_LOGFILE}" ]; then
PBUILDER_BUILD_LOGFILE="../${PKG_SOURCENAME}_${PKG_VERSION}_${ARCHITECTURE}.build"
@@ -80,10 +81,16 @@ else
if ! dpkg-checkbuilddeps -B ; then
log.w "Unmet build-dependency in source"
fi
- echo "dpkg-buildpackage -S -d -us -uc -r${BUILDSOURCEROOTCMD} $DEBBUILDOPTS" | \
- perl -pe 's/(^|\s|=|'\'')-[AbBFgG]('\''|\s|$)/$1$2/g' | \
- perl -pe 's/(^|\s|=)['\'']['\''](\s|$)/$1$2/g' | \
- /bin/bash
+ bash -c "dpkg-source --before-build ."
+ bash -c "${BUILDSOURCEROOTCMD} debian/rules clean"
+ bash -c "dpkg-source --build ."
+ if ! [ "../${DSC}" -ef "${BUILDRESULT}/${DSC}" ]; then
+ log.i "Generating source changes file for original dsc"
+ bash -c "dpkg-genchanges --build=source > ../${SOURCE_CHANGES}"
+ else
+ log.i "Generated dsc will be overwritten by build result; not generating changes file"
+ fi
+ bash -c "dpkg-source --after-build ."
${PBUILDERROOTCMD} \
${PDEBUILD_PBUILDER} \
--build \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git
More information about the Pbuilder-maint
mailing list