diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-11-07 13:13:00 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-07-01 23:53:45 +0100 |
commit | b85aa466413f10b9220edb20482a896d5be3d8c9 (patch) | |
tree | db7ff00fb5dc675f926a722b6faa6f7266f1a2a9 | |
parent | e610d7e252dada2ac0b7b235bf1da3df20552629 (diff) |
Remove any pre-existing _source.changes file before building source, as a safety check.
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | dgit | 4 |
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. @@ -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), |