Skip to content

rewrite indexes after a new upload enters PAUSE #8

Closed
wants to merge 1 commit into from
+16 −2
View
18 lib/PAUSE/mldistwatch.pm
@@ -163,8 +163,22 @@ sub reindex {
$self->checkfornew($testdir);
chdir $startdir or die "Could not chdir to '$startdir'";
rmtree $testdir;
- return if $self->{OPT}{pick};
- $self->rewrite_indexes;
+ return $self->{OPT}{pick} ? $self->rewrite_module_indexes : $self->rewrite_indexes;
+}
+
+# only rewrite those indexes, which needs update after a new upload
+sub rewrite_module_indexes {
+ my $self = shift;
+ $self->rewrite02();
+ my $MLROOT = $self->mlroot;
+ chdir $MLROOT
+ or die "Couldn't chdir to $MLROOT: $!";
+ $self->rewrite01();
+ $self->rewrite06();
+ $self->verbose(1, sprintf(
+ "Finished rewrite03 and everything at %s\n",
+ scalar localtime
+ ));
}
sub rewrite_indexes {
Something went wrong with that request. Please try again.