chiark / gitweb /
fix bug which causes all uploads to go to sid (!)
[dgit.git] / dgit
diff --git a/dgit b/dgit
index df4ea91a0570c512a0f05ed6ddd3bd62aded6d57..2d47dbfebcf201ce6e465e449de15e38e96ccf39 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -849,6 +849,12 @@ sub dopush () {
            ($changesfile) = @cs;
        }
     }
+    my $changes = parsecontrol($changesfile,$changesfile);
+    foreach my $field (qw(Source Distribution Version)) {
+       $changes->{$field} eq $clogp->{$field} or
+           fail "changes field $field \`$changes->{$field}'".
+               " does not match changelog \`$clogp->{$field}'";
+    }
     my $tag = debiantag($dversion);
     if (!check_for_git()) {
        create_remote_git_repo();
@@ -1058,7 +1064,7 @@ sub build_source {
     check_not_dirty();
     my $clogp = parsechangelog();
     $package = getfield $clogp, 'Source';
-    my $isuite = getfield $clogp, 'Distribution';
+    $isuite = getfield $clogp, 'Distribution';
     $version = getfield $clogp, 'Version';
     $sourcechanges = "${package}_${version}_source.changes";
     $dscfn = dscfn($version);