diff options
-rw-r--r-- | debian/changelog | 2 | ||||
-rwxr-xr-x | dgit | 14 | ||||
-rw-r--r-- | dgit.1 | 5 |
3 files changed, 13 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog index 331a316..8d717fd 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. @@ -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; @@ -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. |