aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/control2
-rw-r--r--pbuilder-modules44
2 files changed, 23 insertions, 23 deletions
diff --git a/debian/control b/debian/control
index 6bb5f65..eba941a 100644
--- a/debian/control
+++ b/debian/control
@@ -24,7 +24,7 @@ Package: pbuilder
Architecture: all
Multi-Arch: foreign
Depends: debootstrap | cdebootstrap,
- dpkg-dev,
+ dpkg-dev (>= 1.17.0),
wget,
${misc:Depends}
Recommends: devscripts,
diff --git a/pbuilder-modules b/pbuilder-modules
index 51becbb..886aa57 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -701,39 +701,39 @@ function binNMU() {
return
fi
if [ -z "$BINNMU_MESSAGE" ]; then
- echo "No changelog message provided for binNMU entry."
+ log.e "No changelog message provided for binNMU entry."
exit 1
fi
if [ -z "$BINNMU_VERSION" ]; then
- echo "No version provided for binNMU entry, fall back to 1."
+ log.w "No version provided for binNMU entry, fall back to 1."
BINNMU_VERSION=1
fi
- local cl=$(ls $BUILDPLACE/tmp/buildd/*/debian/changelog)
- local tmpcl=$cl.pbuildertmp
- if [ ! -f $cl ]; then
- echo "Cannot open debian/changelog for binNMU version handling."
+ local cl=$(ls "$BUILDPLACE"/"$BUILDDIR"/*/debian/changelog)
+ local tmpcl=$(mktemp pbuilder.tmpchangelog.XXXXXXXXXXX)
+ if [ ! -f "$cl" ]; then
+ log.e "Cannot open debian/changelog for binNMU version handling."
exit 1
fi
- mv $cl $tmpcl
- local package=$(head -n1 $tmpcl | cut -d" " -f1)
- local version=$(head -n1 $tmpcl | sed 's/.*(\(.*\)).*/\1/')
- local arch=$($CHROOTEXEC dpkg-architecture -qDEB_HOST_ARCH)
- local changedby=$(cat $tmpcl | sed -n '0,/ -- /s/ -- \(.* <.*>\).*/\1/p')
+ 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 date=$(date -R)
if [ -z "$BINNMU_MAINTAINER" ]; then
- echo "No maintainer provided for binNMU entry, fall back to last uploader."
- BINNMU_MAINTAINER=$changedby
+ 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
DEBBUILDOPTS="${DEBBUILDOPTS} -m\"$BINNMU_MAINTAINER\" -e\"$BINNMU_MAINTAINER\""
- echo "$package ($version+b$BINNMU_VERSION) $DISTRIBUTION; urgency=low" > $cl
- echo >> $cl
- echo " * Binary-only non-maintainer upload for $arch; no source changes." >> $cl
- echo " * $BINNMU_MESSAGE" >> $cl
- echo >> $cl
- echo " -- $BINNMU_MAINTAINER $date" >> $cl
- echo >> $cl
- cat $tmpcl >> $cl
- rm $tmpcl
+ cat > "$cl" << EOF
+$package ($version+b$BINNMU_VERSION) $DISTRIBUTION; urgency=low
+ * Binary-only non-maintainer upload for $arch; no source changes.
+ * $BINNMU_MESSAGE
+
+ -- $BINNMU_MAINTAINER $date
+
+EOF
+ cat "$tmpcl" >> "$cl"
+ rm "$tmpcl"
}
#Setting environmental variables that are really required: