X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=lib%2FPackages%2FDoSearchContents.pm;h=34643949f69a66bfd221d2138effc07510a6476c;hb=b2b9a31b9adfdd251590eb1bfb72c95d5538e392;hp=272b23522d6b1322d910ee913cb18abed99a5889;hpb=cc6c820a1e503808b7ac1e2bff132de23f87606b;p=deb%2Fpackages.git diff --git a/lib/Packages/DoSearchContents.pm b/lib/Packages/DoSearchContents.pm index 272b235..3464394 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} = [ 'etch' ]; + $params->{values}{suite}{final} = $opts->{suite} = [ 'sarge' ]; } 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: $!";