]> err.no Git - dpkg/commitdiff
Let dpkg-buildpackage create a .changes file even if signing the
authorFrank Lichtenheld <djpig@debian.org>
Sun, 29 Jan 2006 15:39:23 +0000 (15:39 +0000)
committerFrank Lichtenheld <djpig@debian.org>
Sun, 29 Jan 2006 15:39:23 +0000 (15:39 +0000)
.dsc file failed. This makes it easier to just sign the package
later (Julian Gilbey). Closes: #217963

ChangeLog
debian/changelog
scripts/dpkg-buildpackage.sh

index 59e9276b1ea91afef280791d24a6ed9ab6bd9f61..bc6314bbe430ac84ceb6f4da06facb33f2b4d9d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-01-29  Julian Gilbey  <jdg@debian.org>
+
+       * 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  <wildfire@progsoc.org>
 
        * scripts/dpkg-source.pl (checkdiff): Ignore comments
index f063c0743723357d42954f2660b3725ef00f4fcc..9ab3785bc4d23f7b2a8c752736910f78be70016d 100644 (file)
@@ -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 <guillem@debian.org>  Sun, 29 Jan 2006 06:02:58 +0200
 
index c98e98f55692ade4c9cbcae1c77bcb0cac7d5d44..f8ffea96c7d249ea5325857991bcd2222e175ef2 100755 (executable)
@@ -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