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 5d9e8cb064bdf2222de78e7fa4a930fd6c64ee88..b02081ee339bbaadc9f13f91832e16a84c22f6ef 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 38c1497f808cd9ec990a02a4b230ccad74c643df..9803b13badd507a570d1d04ac77c045b57f6893e 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),