From b85aa466413f10b9220edb20482a896d5be3d8c9 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 7 Nov 2015 13:13:00 +0000 Subject: [PATCH 1/1] Remove any pre-existing _source.changes file before building source, as a safety check. --- debian/changelog | 2 ++ dgit | 4 ++++ 2 files changed, 6 insertions(+) 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), -- 2.30.2