aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-modules
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 /pbuilder-modules
parente659e1ebb57ca22ef9c943bd1b92aa3d8a620907 (diff)
downloadpbuilder-f1f623a1a0fdae690b917c84b96adb0abc714bb6.tar
pbuilder-f1f623a1a0fdae690b917c84b96adb0abc714bb6.tar.gz
fixup a bunch of things for binNMU support
Diffstat (limited to 'pbuilder-modules')
-rw-r--r--pbuilder-modules7
1 files changed, 6 insertions, 1 deletions
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