chiark / gitweb /
Provide --force-dsc-changes-mismatch
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 23 Oct 2016 15:55:41 +0000 (16:55 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 24 Oct 2016 01:05:08 +0000 (02:05 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit
dgit.1

diff --git a/dgit b/dgit
index ea14ba523ca15b4aeafe3637d43e11c4fab2ec00..e22036b7d75ca308d3b605217a44ef71839b5505 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -75,7 +75,8 @@ our $tagformat;
 our $tagformatfn;
 
 our %forceopts = map { $_=>0 }
-    qw(unrepresentable unsupported-source-format);
+    qw(unrepresentable unsupported-source-format
+       dsc-changes-mismatch);
 
 our %format_ok = map { $_=>1 } ("1.0","3.0 (native)","3.0 (quilt)");
 
@@ -237,6 +238,14 @@ sub forceable_fail ($$) {
     print STDERR "warning: overriding problem due to --force:\n". $msg;
 }
 
+sub forceing ($) {
+    my ($forceoptsl) = @_;
+    my @got = grep { $forceopts{$_} } @$forceoptsl;
+    return 0 unless @got;
+    print STDERR
+ "warning: skipping checks or functionality due to --force-$got[0]\n";
+}
+
 sub no_such_package () {
     print STDERR "$us: package $package does not exist in suite $isuite\n";
     exit 4;
@@ -3291,7 +3300,8 @@ END
 
     # Check that changes and .dsc agree enough
     $changesfile =~ m{[^/]*$};
-    files_compare_inputs($dsc, parsecontrol($changesfile,$&));
+    files_compare_inputs($dsc, parsecontrol($changesfile,$&))
+       unless forceing [qw(dsc-changes-mismatch)];
 
     # Checks complete, we're going to try and go ahead:
 
diff --git a/dgit.1 b/dgit.1
index 81786315c4366c30f6550f07902369d65f2b3ba3..f3e87feee095f90238ad2c97875ce70865b18f69 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -740,6 +740,10 @@ Your build or push will probably fail later.
 .B --force-unsupported-source-format
 Carry on despite dgit not understanding your source package format.
 dgit will probably mishandle it.
+.TP
+.B --force-dsc-changes-mismatch
+Do not check whether .dsc and .changes match.
+The archive will probably reject your upload.
 .SH WORKFLOW - SIMPLE
 It is always possible with dgit to clone or fetch a package, make
 changes in git (using git-commit) on the suite branch