summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFrank Lichtenheld <djpig@debian.org>2006-01-29 15:39:23 +0000
committerFrank Lichtenheld <djpig@debian.org>2006-01-29 15:39:23 +0000
commite13789ca4422e11c88b004ee3e14d82ddc52c99b (patch)
tree189c3cde741e3a20a76c9526fda9f613fa5544ee /scripts
parenta099d1b237018d05ba677d860761903a5d8006a3 (diff)
downloaddpkg-e13789ca4422e11c88b004ee3e14d82ddc52c99b.tar.gz
Let dpkg-buildpackage create a .changes file even if signing the
.dsc file failed. This makes it easier to just sign the package later (Julian Gilbey). Closes: #217963
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dpkg-buildpackage.sh22
1 files changed, 19 insertions, 3 deletions
diff --git a/scripts/dpkg-buildpackage.sh b/scripts/dpkg-buildpackage.sh
index c98e98f55..f8ffea96c 100755
--- a/scripts/dpkg-buildpackage.sh
+++ b/scripts/dpkg-buildpackage.sh
@@ -166,8 +166,14 @@ signfile () {
$signcommand -u "${signkey:-$maintainer}" +clearsig=on -fast <"../$1" \
>"../$1.asc"
fi
+ status=$?
+ if [ $status -eq 0 ]; then
+ mv -- "../$1.asc" "../$1"
+ else
+ /bin/rm -f "../$1.asc"
+ fi
echo
- mv -- "../$1.asc" "../$1"
+ return $status
}
withecho () {
@@ -205,8 +211,12 @@ if [ "$usepause" = "true" ] && \
read dummy_stuff
fi
+signerrors=
if [ x$binaryonly = x ]; then
- $signsource "$pv.dsc"
+ if ! $signsource "$pv.dsc"; then
+ signerrors="(WARNING: Failed to sign .dsc and .changes file)"
+ signchanges=:
+ fi
fi
chg=../"$pva.changes"
withecho dpkg-genchanges "$@" >"$chg"
@@ -242,10 +252,16 @@ else
fi
fi
-$signchanges "$pva.changes"
+if ! $signchanges "$pva.changes"; then
+ signerrors="(WARNING: Failed to sign .changes file)"
+fi
if $cleansource; then
withecho $rootcommand debian/rules clean
fi
echo "dpkg-buildpackage: $srcmsg"
+if [ -n "$signerrors" ]; then
+ echo >&2 $signerrors
+ exit 1
+fi