summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog2
-rwxr-xr-xdgit4
2 files changed, 6 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 5d9e8cb..b02081e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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
--- 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),