]> git.donarmstrong.com Git - debbugs.git/commitdiff
[project @ 2003-05-25 12:38:58 by cjwatson]
authorcjwatson <>
Sun, 25 May 2003 19:38:58 +0000 (11:38 -0800)
committercjwatson <>
Sun, 25 May 2003 19:38:58 +0000 (11:38 -0800)
Remove non-hashed db case from rebuild; nothing else supports it any more.

scripts/rebuild.in

index 90df1c706e5c7bfacb8d51bca2a27e959d84bc5b..7646eae4ca4a06de79f1d956e56527937b3c1232 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
-# $Id: rebuild.in,v 1.7 2003/05/24 22:34:16 cjwatson Exp $
+# $Id: rebuild.in,v 1.8 2003/05/25 12:38:58 cjwatson Exp $
 
-# Load modules and set envirnment
+# Load modules and set environment
 use File::Copy;
 $config_path = '/etc/debbugs';
 $lib_path = '/usr/lib/debbugs';
@@ -16,7 +16,7 @@ my $data;
 sub readreport {
     my $lref = shift;
     my $path = shift;
-       
+
     $data = readbug($lref);
     return 1;
 }
@@ -29,10 +29,11 @@ defined($startdate= time) || &quit("failed to get time: $!");
 $archive= shift(@ARGV);
 open IDXFILE, "> index.$archive" or &quit( "trying to reset index file: $!" );
 
-
-if ( $archive eq 'db' )
+#get list of bugs (ie, status files)
+for ($subdir=0; $subdir<100; $subdir++ )
 {
-    opendir(DIR,'db') || next; 
+    my $path = sprintf( "$archive/%.2d", $subdir );
+    opendir(DIR,$path) || next; 
     @list= grep(m/^\d+\.status$/,readdir(DIR));
     closedir DIR;
     grep(s/\.status$//,@list);
@@ -47,26 +48,5 @@ if ( $archive eq 'db' )
        printf IDXFILE "%s %d %s\n", $data->{package}, $ref, $data->{subject};
     }
 }
-else
-{
-    #get list of bugs (ie, status files)
-    for ($subdir=0; $subdir<100; $subdir++ )
-    {
-       my $path = sprintf( "$archive/%.2d", $subdir );
-       opendir(DIR,$path) || next; 
-       @list= grep(m/^\d+\.status$/,readdir(DIR));
-       closedir DIR;
-       grep(s/\.status$//,@list);
-       @list= sort { $a <=> $b } @list;
 
-       #process each bug (ie, status file)
-       while ( defined( $list[0] )) 
-       {
-           my $ref = shift @list;
-           print STDERR "$ref considering\n" if $debug;
-           readreport($ref, $path);
-           printf IDXFILE "%s %d %s\n", $data->{package}, $ref, $data->{subject};
-       }
-    }
-}
 close IDXFILE;