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 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),