From: Ian Jackson Date: Sat, 7 Nov 2015 13:13:00 +0000 (+0000) Subject: Remove any pre-existing _source.changes file before building source, as a safety... X-Git-Tag: archive/debian/2.0~360 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=b85aa466413f10b9220edb20482a896d5be3d8c9 Remove any pre-existing _source.changes file before building source, as a safety check. --- diff --git a/debian/changelog b/debian/changelog index 5d9e8cb0..b02081ee 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 38c1497f..9803b13b 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),