summaryrefslogtreecommitdiff
path: root/infra
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2019-07-06 11:22:00 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2019-07-06 15:58:10 +0100
commit1e23175a29f2070c6a39ba565d6453fb887c6a0e (patch)
tree57124e3f3226169cff37000e319b3df944139a9e /infra
parent581e4e76d488cee8af76798780cbd34d702442dd (diff)
dgit-repos-server: parsetag_general: Switch to $distrofn
No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'infra')
-rwxr-xr-xinfra/dgit-repos-server11
1 files changed, 6 insertions, 5 deletions
diff --git a/infra/dgit-repos-server b/infra/dgit-repos-server
index 361fa4a..eea5d94 100755
--- a/infra/dgit-repos-server
+++ b/infra/dgit-repos-server
@@ -572,8 +572,8 @@ sub readtag () {
$!=0; $_=<T>; defined or die $!;
}
-sub parsetag_general ($;$) {
- my ($dgititemfn, $need_distro) = @_;
+sub parsetag_general ($$) {
+ my ($dgititemfn, $distrofn) = @_;
printdebug " parsetag...\n";
my $copyl = $_;
@@ -586,8 +586,7 @@ sub parsetag_general ($;$) {
while (length) {
if ($dgititemfn->()) {
} elsif (s/^distro\=(\S+) //) {
- die "$1 != $distro" unless $1 eq $distro;
- $need_distro = 0;
+ $distrofn->($1);
} elsif (s/^[-+.=0-9a-z]\S* //) {
} else {
die "unknown dgit info in tag ($_)";
@@ -597,7 +596,6 @@ sub parsetag_general ($;$) {
}
last if m/^-----BEGIN PGP/;
}
- reject "need distro info in tag" if $need_distro;
$_ = $copyl;
for (;;) {
@@ -629,6 +627,9 @@ sub parsetag () {
return 0;
}
return 1;
+ }, sub {
+ my ($gotdistro) = @_;
+ die "$gotdistro != $distro" unless $gotdistro eq $distro;
};
}