diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-11-07 13:41:15 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-07-01 23:53:45 +0100 |
commit | 60650085bd40450e3b1276438ae3023e1648d343 (patch) | |
tree | 75d0fcdd9ab4c7a3687ac87faec5e07811d31d87 /dgit | |
parent | a4877226404a1a34181bb93c513af716834d7cb4 (diff) |
dgit sbuild no longer deletes extranious .changes files; instead we rely on --rm-old-changes, or failing that, fail early.
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -3149,16 +3149,20 @@ sub cmd_build_source { sub cmd_sbuild { build_source(); - changedir ".."; my $pat = changespat $version; + if (!$rmchanges) { + my @unwanted = map { s#^\.\./##; $_; } glob "../$pat"; + @unwanted = grep { $_ ne changespat $version,'source' } @unwanted; + fail "changes files other than source matching $pat". + " already present (@unwanted);". + " building would result in ambiguity about the intended results" + if @unwanted; + } + changedir ".."; if (act_local()) { stat_exists $dscfn or fail "$dscfn (in parent directory): $!"; stat_exists $sourcechanges or fail "$sourcechanges (in parent directory): $!"; - foreach my $cf (glob $pat) { - next if $cf eq $sourcechanges; - unlink $cf or fail "remove $cf: $!"; - } } runcmd_ordryrun_local @sbuild, qw(-d), $isuite, @ARGV, $dscfn; my @changesfiles = glob $pat; |