]> git.deb.at Git - deb/packages.git/blobdiff - lib/Packages/DoSearchContents.pm
fix off-by-one after switching on the brain again
[deb/packages.git] / lib / Packages / DoSearchContents.pm
index 272b23522d6b1322d910ee913cb18abed99a5889..a51ee8e01330dc223a9cb0e38edefb4f475e863b 100644 (file)
@@ -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} = [ 'lenny' ];
     }
 
     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: $!";