X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=lib%2FPackages%2FDoSearchContents.pm;h=ca83dcbdcb25e38639415d50d142157af0e10d36;hb=b9f1ee37ac17e618a6f4ec774823bc551a952839;hp=b28717f8ce7416e859a42bb97792d730d8018c8b;hpb=53b25da0ba337c9a87ac8a3d95fbfee03b035972;p=deb%2Fpackages.git diff --git a/lib/Packages/DoSearchContents.pm b/lib/Packages/DoSearchContents.pm index b28717f..ca83dcb 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} = [ 'hardy' ]; } 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: $!";