From: Ian Jackson Date: Thu, 5 Jul 2018 12:11:35 +0000 (+0100) Subject: WTF X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=1f3dbd02d899be1183bccc69c8bcee67608b02c4 WTF --- diff --git a/dgit b/dgit index 3ad67ef5..8463e971 100755 --- a/dgit +++ b/dgit @@ -970,9 +970,12 @@ sub parsecontrolfh ($$;$) { my %opts = ('name' => $desc); $opts{allow_pgp}= $allowsigned || !$dpkgcontrolhash_noissigned; $c = Dpkg::Control::Hash->new(%opts); -print STDERR "DCHn\n"; +eval { +print STDERR "DCHn\n", Dumper(\%opts); $c->parse($fh,$desc) or die "parsing of $desc failed"; print STDERR "parse\n"; +}; +confess $@ if $@; last if $allowsigned; last if $dpkgcontrolhash_noissigned; my $issigned= $c->get_option('is_pgp_signed'); @@ -4184,6 +4187,8 @@ sub push_mktags ($$ $$ $) { my $changes = parsecontrol($changesfile,$changesfilewhat); foreach my $field (qw(Source Distribution Version)) { + confess Dumper($changes,$clogp) unless $changes->{$field} && + $clogp->{$field}; $changes->{$field} eq $clogp->{$field} or fail "changes field $field \`$changes->{$field}'". " does not match changelog \`$clogp->{$field}'"; diff --git a/tests/tests/sourceonlypolicy b/tests/tests/sourceonlypolicy index b0569c30..b797b179 100755 --- a/tests/tests/sourceonlypolicy +++ b/tests/tests/sourceonlypolicy @@ -2,7 +2,7 @@ set -e . tests/lib -t-tstunt-parsechangelog +#t-tstunt-parsechangelog t-prep-newpackage example 1.0