From 60650085bd40450e3b1276438ae3023e1648d343 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 7 Nov 2015 13:41:15 +0000 Subject: [PATCH] dgit sbuild no longer deletes extranious .changes files; instead we rely on --rm-old-changes, or failing that, fail early. --- debian/changelog | 2 ++ dgit | 14 +++++++++----- dgit.1 | 5 ++--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 331a3168..8d717fd5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,8 @@ dgit (1.5~~) unstable; urgency=medium as a safety check. * No longer tolerate a multitude of .changes files when doing push. Instead, insist on a single one. + * dgit sbuild no longer deletes extranious .changes files; instead + we rely on --rm-old-changes, or failing that, fail early. Documentation: * Document the dgit-distro.DISTRO.quilt-mode config setting. diff --git a/dgit b/dgit index e59060d2..15a0b0a6 100755 --- a/dgit +++ b/dgit @@ -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; diff --git a/dgit.1 b/dgit.1 index 588aac66..87367c25 100644 --- a/dgit.1 +++ b/dgit.1 @@ -127,9 +127,8 @@ Constructs the source package, uses .B sbuild to do a binary build, and uses mergechanges to merge the source and binary changes files. Options and arguments after sbuild will be -passed on to sbuild. Changes files matching -.IB package _ version _*.changes -in the parent directory will be removed; the output is left in +passed on to sbuild. +The output is left in .IR package \fB_\fR version \fB_multi.changes\fR. Tagging, signing and actually uploading should be left to dgit push. -- 2.30.2