chiark / gitweb /
Test suite: Add fakeroot and make to Test-Depends.
[dgit.git] / dgit
diff --git a/dgit b/dgit
index aab59b31e4a2877ef18460918a954b97c3e19354..8264f3e576a625e37cecb9c30bfe70f3596fd9a4 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3200,7 +3200,10 @@ sub push_parse_changelog ($) {
     my $clogp = Dpkg::Control::Hash->new();
     $clogp->load($clogpfn) or die;
 
-    $package = getfield $clogp, 'Source';
+    my $clogpackage = getfield $clogp, 'Source';
+    $package //= $clogpackage;
+    fail "-p specified $package but changelog specified $clogpackage"
+       unless $package eq $clogpackage;
     my $cversion = getfield $clogp, 'Version';
     my $tag = debiantag($cversion, access_basedistro);
     runcmd @git, qw(check-ref-format), $tag;