aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-11-23 18:24:58 +0000
committerMattia Rizzolo <mattia@mapreri.org>2015-11-23 18:24:58 +0000
commitf1f623a1a0fdae690b917c84b96adb0abc714bb6 (patch)
tree1cf272a64861a3b481d15545764e96c27436d873
parente659e1ebb57ca22ef9c943bd1b92aa3d8a620907 (diff)
downloadpbuilder-f1f623a1a0fdae690b917c84b96adb0abc714bb6.tar
pbuilder-f1f623a1a0fdae690b917c84b96adb0abc714bb6.tar.gz
fixup a bunch of things for binNMU support
-rwxr-xr-xpbuilder-buildpackage2
-rw-r--r--pbuilder-modules7
2 files changed, 8 insertions, 1 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage
index ccd7eb7..a4572bb 100755
--- a/pbuilder-buildpackage
+++ b/pbuilder-buildpackage
@@ -138,6 +138,8 @@ else
exit 1;
fi
+binNMU
+
log.i "Building the package"
executehooks "A"
diff --git a/pbuilder-modules b/pbuilder-modules
index 93916bb..5d4b5be 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -701,6 +701,7 @@ function binNMU() {
log.w "No version provided for binNMU entry, fall back to 1."
BINNMU_VERSION=1
fi
+ log.i "Doing a binNMU, version $BINNMU_VERSION to '$BINNMU_MESSAGE'"
local cl=$(ls "$BUILDPLACE"/"$BUILDDIR"/*/debian/changelog)
local tmpcl=$(mktemp pbuilder.tmpchangelog.XXXXXXXXXXX)
if [ ! -f "$cl" ]; then
@@ -710,12 +711,16 @@ function binNMU() {
mv "$cl" "$tmpcl"
local package=$(dpkg-parsechangelog -l "$tmpcl" -c 1 --show-field Source)
local version=$(dpkg-parsechangelog -l "$tmpcl" -c 1 --show-field Version)
- local arch=$("$CHROOTEXEC" dpkg-architecture -qDEB_HOST_ARCH)
+ local arch=$($CHROOTEXEC dpkg-architecture -qDEB_HOST_ARCH)
local date=$(date -R)
if [ -z "$BINNMU_MAINTAINER" ]; then
log.w "No maintainer provided for binNMU entry, fall back to last uploader."
BINNMU_MAINTAINER=$(dpkg-parsechangelog -l $tmpcl -c 1 --show-field Maintainer)
fi
+ if [ -z "$DISTRIBUTION" ]; then
+ log.w "No distribution provided, using the field from the last upload"
+ DISTRIBUTION=$(dpkg-parsechangelog -l "$tmpcl" -c 1 --show-field Distribution)
+ fi
DEBBUILDOPTS="${DEBBUILDOPTS} -e\"$BINNMU_MAINTAINER\""
cat > "$cl" << EOF
$package ($version+b$BINNMU_VERSION) $DISTRIBUTION; urgency=low, binary-only=yes