From adcac7cc282e2683ebdeaee9c53b2d98c0bf8661 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 6 Nov 2015 14:32:03 +0000 Subject: [PATCH 1/1] sbuild: Check that the binary .changes file doesn't contain a .dsc. --- debian/changelog | 10 ++++++---- dgit | 5 +++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index a9c6e9e4..44aedd2e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,10 +8,12 @@ dgit (1.5~~) unstable; urgency=medium to change for the dgit user. New checks and improved behaviours: - * In dgit sbuild, check that the set of .changes files found is as we - expect, before calling mergechanges, and rename the used-up .changes - files to `.inmulti' to avoid accidental use of the wrong one (by - software, or by users). + * dgit sbuild: check that the set of .changes files found is as we + expect, before calling mergechanges. + * dgit sbuild: Rename the used-up .changes files to `.inmulti' to + avoid accidental use of the wrong one (by software, or by users). + * dgit sbuild: Check that the binary .changes file doesn't contain a + .dsc. Bugfixes: * When cleaning up after failed clone, stat the to-be-cleaned-up diff --git a/dgit b/dgit index a4dea9b4..9ac8d544 100755 --- a/dgit +++ b/dgit @@ -3154,6 +3154,11 @@ sub cmd_sbuild { } @changesfiles; fail "wrong number of different changes files (@changesfiles)" unless @changesfiles==2; + my $binchanges = parsecontrol($changesfiles[1], "binary changes file"); + foreach my $l (split /\n/, getfield $binchanges, 'Files') { + fail "$l found in binaries changes file $binchanges" + if $l =~ m/\.dsc$/; + } runcmd_ordryrun_local @mergechanges, @changesfiles; my $multichanges = "${package}_".(stripepoch $version)."_multi.changes"; if (act_local()) { -- 2.30.2