my ($links,$regex,$join) = @_;
if (not defined $regex and not defined $join) {
$links =~ s{((?:ftp|http|https)://[\S~-]+?/?)([\)\'\:\.\,]?(?:\s|\.<|$))}
- {q(<a href=\").html_escape($1).q(\">).html_escape($1).q(</a>).$2}geimo;
+ {q(<a href=").html_escape($1).q(">).html_escape($1).q(</a>).$2}geimo;
return $links;
}
$join = ' ' if not defined $join;
return $email;
}
+my $modification_made = 0;
my $cnt = 0;
my @dirs = ($initialdir);
}
next if $stat->mtime < $time;
my $fdata = readbug($bug, $initialdir);
+ $modification_made = 1;
addbugtoindex("package", $bug, split /[\s,]+/, $fdata->{"package"});
addbugtoindex("tag", $bug, split /[\s,]+/, $fdata->{"keywords"});
addbugtoindex('submitter-email', $bug,
}
}
-
for my $i (@indexes) {
- untie %{$slow_index{$i}};
+ untie %{$slow_index{$i}};
+ # Only move if we've made changes, otherwise unlink
+ if ($modification_made) {
move("$indexdest/by-$i$suffix.idx.new", "$indexdest/by-$i$suffix.idx");
# We do this, because old versions of touch don't support -d '@epoch'
system('touch','-d',"1/1/1970 UTC + ${start_time}secs","$indexdest/by-$i$suffix.idx");
+ }
+ else {
+ unlink("$indexdest/by-$i$suffix.idx.new");
+ }
}
unlink($config{spool_dir}.'/lock/gen-indices')
use Debbugs::Packages qw(getpkgsrc);
use Debbugs::User qw(read_usertags write_usertags);
use Debbugs::Common qw(:lock get_hashname);
-use Debbugs::Status qw(writebug isstrongseverity lockreadbugmerge lockreadbug);
+use Debbugs::Status qw(writebug isstrongseverity lockreadbugmerge lockreadbug read_bug :versions);
use Debbugs::CGI qw(html_escape bug_url);
use Debbugs::Text qw(:templates);
-use Debbugs::Status qw(:versions);
use Debbugs::Config qw(:globals :config);
use Debbugs::Control qw(append_action_to_log);