changes for thread safety
[buildfarm-server.git] / cgi-bin / show_status.pl
index 3fc48cda67ad782eb2b167c1e0474381cc8a82c1..f0b6f17d29936f44dc06e7dad8d3f63a3c2fa964 100755 (executable)
@@ -39,8 +39,8 @@ my $db = DBI->connect($dsn,$dbuser,$dbpass) or die("$dsn,$dbuser,$dbpass,$!");
 my $statement =<<EOS;
 
 
-  select *
-  from dashboard
+  select timezone('GMT'::text, now())::timestamp(0) without time zone - b.snapshot AS when_ago, b.*
+  from dashboard_mat b
   order by branch = 'HEAD' desc,
         branch desc, $sort_clause 
         snapshot desc
@@ -56,6 +56,18 @@ while (my $row = $sth->fetchrow_hashref)
     next if (@members && ! grep {$_ eq $row->{sysname} } @members);
     $row->{build_flags}  =~ s/^\{(.*)\}$/$1/;
     $row->{build_flags}  =~ s/,/ /g;
+       # enable-integer-datetimes is now the default
+       if ($row->{branch} eq 'HEAD' || $row->{branch} gt 'REL8_3_STABLE')
+       {
+               $row->{build_flags} .= " --enable-integer-datetimes "
+                       unless ($row->{build_flags} =~ /--(en|dis)able-integer-datetimes/);
+       }
+       # enable-thread-safety is now the default
+       if ($row->{branch} eq 'HEAD' || $row->{branch} gt 'REL8_5_STABLE')
+       {
+               $row->{build_flags} .= " --enable-thread-safety "
+                       unless ($row->{build_flags} =~ /--(en|dis)able-thread-safety/);
+       }
     $row->{build_flags}  =~ s/--((enable|with)-)?//g;
        $row->{build_flags} =~ s/libxml/xml/;
     $row->{build_flags}  =~ s/\S+=\S+//g;
@@ -102,7 +114,7 @@ __DATA__
 [%- BLOCK img ; IF flag == 'depend' or flag == 'gnu-ld' ; ; ELSIF flag_imgs.$flag %]<img src="[% flag_imgs.$flag %]" title="[% flag %]" alt="[% flag %]" height="16" width="16" class="inline" align="bottom" />  [% ELSE %][%#
                                                                                                                                                                                                          flag ; ' '
 %][% END ; END -%]
-[%- BLOCK cl %] class=" [% SWITCH bgfor -%]
+[%- BLOCK cl %] class="[% SWITCH bgfor.replace('-.*','') -%]
   [%- CASE 'OK' %]pass[% CASE 'ContribCheck' %]warn[% CASE [ 'Check' 'InstallCheck' ] %]warnx[% CASE %]fail[% END %]"
 [%- END -%]
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"