summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2015-11-07 13:41:15 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-07-01 23:53:45 +0100
commit60650085bd40450e3b1276438ae3023e1648d343 (patch)
tree75d0fcdd9ab4c7a3687ac87faec5e07811d31d87
parenta4877226404a1a34181bb93c513af716834d7cb4 (diff)
dgit sbuild no longer deletes extranious .changes files; instead we rely on --rm-old-changes, or failing that, fail early.
-rw-r--r--debian/changelog2
-rwxr-xr-xdgit14
-rw-r--r--dgit.15
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.
diff --git a/dgit b/dgit
index e59060d..15a0b0a 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 588aac6..87367c2 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.