From: Frank Lichtenheld Date: Sun, 29 Jan 2006 15:39:23 +0000 (+0000) Subject: Let dpkg-buildpackage create a .changes file even if signing the X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e13789ca4422e11c88b004ee3e14d82ddc52c99b;p=dpkg 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 --- diff --git a/ChangeLog b/ChangeLog index 59e9276b..bc6314bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-29 Julian Gilbey + + * scripts/dpkg-buildpackage.sh: Create .changes + file even if signing .dsc file fails to make it + easier to just sign the package later. + 2006-01-29 Anand Kumria * scripts/dpkg-source.pl (checkdiff): Ignore comments diff --git a/debian/changelog b/debian/changelog index f063c074..9ab3785b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,10 @@ dpkg (1.13.14~) UNRELEASED; urgency=low [ Frank Lichtenheld ] * Let dpkg-source ignore comments in the hunk header as used by - diff -p (Anand Kumria). Closes: #344880 + diff -p (Anand Kumria). Closes: #344880 + * 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 -- Guillem Jover Sun, 29 Jan 2006 06:02:58 +0200 diff --git a/scripts/dpkg-buildpackage.sh b/scripts/dpkg-buildpackage.sh index c98e98f5..f8ffea96 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