) {
+ $_ =~ $regex or next;
+ print "DEBUG: Matched line $.
" if $debug > 2;
+ push @lines, $.;
+ }
+ close DESC;
+
+ my $obj = tie my %packages, 'DB_File', "$DBDIR/packages_small.db", O_RDONLY, 0666, $DB_BTREE
+ or die "couldn't tie DB $DBDIR/packages_small.db: $!";
+ my $obj = tie my %did2pkg, 'DB_File', "$DBDIR/descriptions_packages.db", O_RDONLY, 0666, $DB_BTREE
+ or die "couldn't tie DB $DBDIR/descriptions_packages.db: $!";
+
+ my %tmp_results;
+ foreach my $l (@lines) {
+ my $result = $did2pkg{$l};
+ foreach (split /\000/o, $result) {
+ my @data = split /\s/, $_, 3;
+ next unless $archs{$data[2]};
+ $tmp_results{$data[0]}++;
+ }
+ }
+ foreach my $pkg (keys %tmp_results) {
+ read_entry( \%packages, $pkg, \@results );
+ }
}
my $st1 = new Benchmark;
@@ -276,6 +346,10 @@ if ($format eq 'html') {
}
}
+if ($too_much_hits) {
+print "Your search was too wide so we will only display exact matches. At least $too_much_hits results have been omitted and will not be displayed. Please consider using a longer keyword or more keywords.
";
+}
+
if (!@results) {
if ($format eq 'html') {
my $keyword_esc = uri_escape( $keyword );