chiark / gitweb /
Remove any pre-existing _source.changes file before building source, as a safety...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Nov 2015 13:13:00 +0000 (13:13 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 1 Jul 2016 22:53:45 +0000 (23:53 +0100)
debian/changelog
dgit

index 5d9e8cb..b02081e 100644 (file)
@@ -16,6 +16,8 @@ dgit (1.5~~) unstable; urgency=medium
   * dgit sbuild: Check that the binary .changes file doesn't contain a
     .dsc.
   * Introduce --rm-old-changes to delete previous builds' changes files.
+  * Remove any pre-existing _source.changes file before building source,
+    as a safety check.
 
   Documentation:
   * Document the dgit-distro.DISTRO.quilt-mode config setting.
diff --git a/dgit b/dgit
index 38c1497..9803b13 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3122,6 +3122,10 @@ sub build_source {
     }
     build_prep();
     $sourcechanges = changespat $version,'source';
+    if (act_local()) {
+       unlink "../$sourcechanges" or $!==ENOENT
+           or fail "remove $sourcechanges: $!";
+    }
     $dscfn = dscfn($version);
     if ($cleanmode eq 'dpkg-source') {
        runcmd_ordryrun_local @dpkgbuildpackage, qw(-us -uc -S),