chiark / gitweb /
Better checking that the supplied .dsc and debian/changes correspond.
[dgit.git] / dgit
diff --git a/dgit b/dgit
index b136ed98a81ed45a5b96eac0ff5815992ec3bd87..fcc792d6cc432619e2fd93c83a412612a50e134a 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -724,8 +724,12 @@ sub dopush () {
        fail "looked for .dsc $dscfn, but $!;".
            " maybe you forgot to build";
     $dsc = parsecontrol("../$dscfn","$dscfn");
+    my $dscpackage = getfield $dsc, 'Source';
     my $format = getfield $dsc, 'Format';
     my $dversion = getfield $dsc, 'Version';
+    ($dscpackage eq $package && $dversion eq $cversion)
+       fail "$dsc is for $dscpackage $dversion".
+           " but debian/changelog is for $package $cversion";
     print DEBUG "format $format\n";
     if ($format eq '3.0 (quilt)') {
        print "Format \`$format', urgh\n";