]> git.deb.at Git - deb/packages.git/blobdiff - cgi-bin/search_packages.pl
Implement search_contents bluntly
[deb/packages.git] / cgi-bin / search_packages.pl
index 0c78978fdef0914ee3bc470d9837fdefa640bc6f..c74ffc27689007cb035b47133d18287a4f5ffc15 100755 (executable)
@@ -159,8 +159,7 @@ unless (@Packages::CGI::fatal_errors) {
                                           \&read_src_entry, \%opts ) };
     } elsif ($searchon eq 'contents') {
        require "./search_contents.pl";
-       &contents(\$input);
-       exit;
+       &contents($input);
     } else {
        push @results, @{ do_names_search( $keyword, \%packages,
                                           $p_obj,
@@ -278,12 +277,13 @@ if (@results) {
 
 my @pkgs = sort(keys %pkgs, keys %provided_by);
        if ($opts{format} eq 'html') {
-           my ($start, $end) = multipageheader( $input, scalar @pkgs, \%opts );
-           my $count = 0;
+           #my ($start, $end) = multipageheader( $input, scalar @pkgs, \%opts );
+           print "<p>Found <em>".(scalar @pkgs)."</em> matching packages,";
+           #my $count = 0;
        
            foreach my $pkg (@pkgs) {
-               $count++;
-               next if $count < $start or $count > $end;
+               #$count++;
+               #next if $count < $start or $count > $end;
                printf "<h3>Package %s</h3>\n", $pkg;
                print "<ul>\n";
                foreach my $suite (@SUITES) {
@@ -333,12 +333,13 @@ my @pkgs = sort(keys %pkgs, keys %provided_by);
        }
 
        if ($opts{format} eq 'html') {
-           my ($start, $end) = multipageheader( $input, scalar keys %pkgs, \%opts );
-           my $count = 0;
+           #my ($start, $end) = multipageheader( $input, scalar keys %pkgs, \%opts );
+           print "<p>Found <em>".(scalar keys %pkgs)."</em> matching packages,";
+           #my $count = 0;
            
            foreach my $pkg (sort keys %pkgs) {
-               $count++;
-               next if ($count < $start) or ($count > $end);
+               #$count++;
+               #next if ($count < $start) or ($count > $end);
                printf "<h3>Source package %s</h3>\n", $pkg;
                print "<ul>\n";
                foreach my $suite (@SUITES) {
@@ -368,7 +369,7 @@ my @pkgs = sort(keys %pkgs, keys %provided_by);
            }
        }
     }
-    printindexline( $input, scalar keys %pkgs, \%opts );
+    #printindexline( $input, scalar keys %pkgs, \%opts );
 }
 #print_results(\@results, \%opts) if @results;;
 my $tet1 = new Benchmark;