X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=lib%2FPackages%2FDoSearchContents.pm;h=96e1836ce1a7fa2263188ddca341ab3801a795e3;hb=ce10f2fe75bc7b12f7230aee1a09437377ec5680;hp=fd19f0f058e30c620fbef439a65b91162af04e59;hpb=c883af946ec2cdf1b20a2fac5c532812fae1270f;p=deb%2Fpackages.git diff --git a/lib/Packages/DoSearchContents.pm b/lib/Packages/DoSearchContents.pm index fd19f0f..96e1836 100644 --- a/lib/Packages/DoSearchContents.pm +++ b/lib/Packages/DoSearchContents.pm @@ -33,7 +33,7 @@ sub do_search_contents { #FIXME: that's extremely hacky atm if ($params->{values}{suite}{no_replace}[0] eq 'default') { $params->{values}{suite}{no_replace} = - $params->{values}{suite}{final} = $opts->{suite} = [ 'gutsy' ]; + $params->{values}{suite}{final} = $opts->{suite} = [ 'karmic' ]; } if (@{$opts->{suite}} > 1) { @@ -58,6 +58,10 @@ sub do_search_contents { # full filename search is tricky my $ffn = $mode eq 'filename'; + unless (-e "$DBDIR/contents/reverse_$suite.db") { + fatal_error($cat->g("No contents information available for this suite")); + return; + } my $reverses = tie my %reverses, 'DB_File', "$DBDIR/contents/reverse_$suite.db", O_RDONLY, 0666, $DB_BTREE or die "Failed opening reverse DB: $!"; @@ -117,7 +121,7 @@ sub do_search_contents { $page_content->{suite} = $suite; $page_content->{archive} = $archive; $page_content->{all_architectures} = \@all_archs; - $page_content->{all_suites} = \@SUITES; + $page_content->{all_suites} = [ grep { $_ !~ /-(updates|backports)$/ } @SUITES ]; $page_content->{mode} = $mode; $page_content->{search_architectures} = $opts->{arch}; $page_content->{search_keywords} = $opts->{keywords};