X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=lib%2FPackages%2FDoSearchContents.pm;h=96e1836ce1a7fa2263188ddca341ab3801a795e3;hb=66a3f9223a4d8ba393f0f3e4a05a5d46a8b33daf;hp=b28717f8ce7416e859a42bb97792d730d8018c8b;hpb=53b25da0ba337c9a87ac8a3d95fbfee03b035972;p=deb%2Fpackages.git diff --git a/lib/Packages/DoSearchContents.pm b/lib/Packages/DoSearchContents.pm index b28717f..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: $!";