chiark / gitweb /
Remove any pre-existing _source.changes file before building source, as a safety...
[dgit.git] / dgit
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),