changeset 189:44efabf551e0

When signing Release files, delete the signature before creating a new one to avoid gpg asking whether to overwrite the signature file.
author Bernhard Herzog <bh@intevation.de>
date Tue, 08 Jul 2008 15:39:34 +0000
parents f72530307eea
children e83db4482aab
files treepkg/builder.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/treepkg/builder.py	Thu Jun 26 16:48:20 2008 +0000
+++ b/treepkg/builder.py	Tue Jul 08 15:39:34 2008 +0000
@@ -111,6 +111,13 @@
         release_filename = os.path.join(self.extra_pkg_dir, "Release")
         run.call(cmdexpand("apt-ftparchive release ."),
                  stdout=open(release_filename, "w"), cwd=self.extra_pkg_dir)
+        # handle signatures.  remove any existing signature because it
+        # will be invalid now.
+        signature = release_filename + ".gpg"
+        try:
+            os.remove(signature)
+        except OSError:
+            pass
         if self.release_signing_keyid:
             run.call(cmdexpand("gpg --detach-sign --armor --local-user=$keyid"
                                " -o $sig $release",
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)