summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2013-08-22 13:20:58 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2013-08-22 13:20:58 +0100
commit5d801671f8126208d31fb1649edd152165f5a999 (patch)
tree7e90ef345f892862fa302a321ac706d34212b638
parent248d3ee0c1ff40fc3e7edba70baf7a68f0cc1a55 (diff)
Better checking that the supplied .dsc and debian/changes correspond.
-rw-r--r--debian/changelog1
-rwxr-xr-xdgit4
2 files changed, 5 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 328c744..dc9e5ab 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ dgit (0.4) experimental; urgency=low
* Fail if a required config item is missing.
* Much better error messages.
* Better error checking when parsing RFC822-style control data.
+ * Better checking that the supplied .dsc and debian/changes correspond.
--
diff --git a/dgit b/dgit
index b136ed9..fcc792d 100755
--- 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";