aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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