From e6b6b7adafee01d875c5af5a8a7d907b2060fe1f Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 3 Aug 2016 07:35:19 -0700 Subject: [PATCH] ignore Extra-Source-Only: yes packages and make sure the last entry gets inserted --- examples/debian/versions/build-mldbm.pl | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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; - } } + -- 2.39.2