Mailing List Archive

svn commit: r231551 - /spamassassin/trunk/build/buildbot_ready
Author: jm
Date: Thu Aug 11 18:13:19 2005
New Revision: 231551

URL: http://svn.apache.org/viewcvs?rev=231551&view=rev
Log:
buildbot: bring the buildbot_ready script back into the picture, but more lax this time

Modified:
spamassassin/trunk/build/buildbot_ready

Modified: spamassassin/trunk/build/buildbot_ready
URL: http://svn.apache.org/viewcvs/spamassassin/trunk/build/buildbot_ready?rev=231551&r1=231550&r2=231551&view=diff
==============================================================================
--- spamassassin/trunk/build/buildbot_ready (original)
+++ spamassassin/trunk/build/buildbot_ready Thu Aug 11 18:13:19 2005
@@ -7,9 +7,15 @@
my $syncfile = shift @ARGV;

if ($command eq 'start') {
- if ($syncfile) {
- # sleep until it disappears, or times out
- while (-f $syncfile && mtime_age_secs($syncfile) < 60*60) {
+ if ($syncfile)
+ {
+ # sleep until it disappears, or times out.
+ # on second thoughts, just sleep a little bit if it exists,
+ # don't wait for it to disappear entirely. this just gives us
+ # a little delay, to avoid overloading, without totally screwing
+ # up if a lockfile gets left lying around...
+
+ if (-f $syncfile && mtime_age_secs($syncfile) < 60*60) {
print "$syncfile exists with age ".mtime_age_secs($syncfile).", sleeping\n";
sleep 60*3 + rand(60*5);
}
@@ -17,9 +23,11 @@
open (TOUCH, ">$syncfile"); close TOUCH;
}

+ # ensure we're in a safe state to build
system ("$perl Makefile.PL < /dev/null");
system ("make distclean");
system ("rm -rf Mail-SpamAssassin*");
+
}
elsif ($command eq 'stop') {
if ($syncfile) {