From: Don Armstrong Date: Wed, 3 Aug 2016 14:35:19 +0000 (-0700) Subject: ignore Extra-Source-Only: yes packages and make sure the last entry gets inserted X-Git-Tag: release/2.6.0~192 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=e6b6b7adafee01d875c5af5a8a7d907b2060fe1f;hp=14a0ebc67f8b2510e7ca09d3298f23469bd03c32 ignore Extra-Source-Only: yes packages and make sure the last entry gets inserted --- diff --git a/examples/debian/versions/build-mldbm.pl b/examples/debian/versions/build-mldbm.pl index 9bcf44b..4b4d359 100755 --- a/examples/debian/versions/build-mldbm.pl +++ b/examples/debian/versions/build-mldbm.pl @@ -19,10 +19,25 @@ print "$archive/$dist/$arch\n"; my $time = time; my ($p, $v); +my $extra_source_only = 0; while (<>) { if (/^Package: (.*)/) { $p = $1; } elsif (/^Version: (.*)/) { $v = $1; } + elsif (/^Extra-Source-Only: yes/) { + $extra_source_only = 1; + } elsif (/^$/) { + if ($extra_source_only) { + $extra_source_only = 0; + next; + } + update_package_version($p,$v,$time); + } +} +update_package_version($p,$v,$time) unless $extra_source_only; + +sub update_package_version { + my ($p,$v,$t) = @_; # see MLDBM(3pm)/BUGS my $tmp = $db{$p}; # we allow multiple versions in an architecture now; this @@ -33,5 +48,5 @@ while (<>) { $tmp->{$dist}{$arch}{$v} = $time if not exists $tmp->{$dist}{$arch}{$v}; $db2{$p} = $tmp; - } } +