OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-web                      Date:   21-Feb-2004 23:52:07
  Branch: HEAD                             Handle: 2004022122520700

  Modified files:
    openpkg-web             status.cgi

  Log:
    flush version used to create 2.0

  Summary:
    Revision    Changes     Path
    1.8         +30 -28     openpkg-web/status.cgi
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-web/status.cgi
  ============================================================================
  $ cvs diff -u -r1.7 -r1.8 status.cgi
  --- openpkg-web/status.cgi    21 Jan 2004 10:47:11 -0000      1.7
  +++ openpkg-web/status.cgi    21 Feb 2004 22:52:07 -0000      1.8
  @@ -1,4 +1,4 @@
  -#!/usr/bin/perl
  +#!/usr/opkg/bin/perl
   ##
   ##  status.cgi -- Package Build Farm Status Report
   ##
  @@ -21,23 +21,23 @@
   my $mtime = (stat("status.txt"))[9];
   my $updated = strftime("%a %d-%b-%Y %H:%M", localtime($mtime));
   
  -my $major = 9;
  -
   my %id2host = (
  -    'ixFB4' => 'dv1',
  -    'ixFB5' => 'dv2',
  -    'ixDL2' => 'dv5',
  -    'ixDL3' => 'dv6',
  -    'ixDLT' => 'dv19',
  -    'ixRL9' => 'dv4',
  -    'ixRA3' => 'dv23',
  -    'ixSL8' => 'dv14',
  -    'ixSL9' => 'dv17',
  -    'ixSO9' => 'dv7',
  -    'usSO8' => 'dv8',
  -    'usSO9' => 'dv9',
  -    'ixSOX' => 'dv16',
  -    'usSO6' => 'dv13',
  +    'ixFB4' => { -host => 'dv1',  -important => 1 },
  +    'ixFB5' => { -host => 'dv2',  -important => 1 },
  +    'ixDL2' => { -host => 'dv5',  -important => 0 },
  +    'ixDL3' => { -host => 'dv6',  -important => 1 },
  +    'ixDLT' => { -host => 'dv19', -important => 1 },
  +    'ixRL9' => { -host => 'dv4',  -important => 0 },
  +    'ixFC1' => { -host => 'dv22', -important => 1 },
  +    'ixRE3' => { -host => 'dv23', -important => 1 },
  +    'ixGL1' => { -host => 'dv18', -important => 0 },
  +    'ixSL8' => { -host => 'dv14', -important => 0 },
  +    'ixSL9' => { -host => 'dv17', -important => 1 },
  +    'ixSO9' => { -host => 'dv7',  -important => 1 },
  +    'usSO9' => { -host => 'dv9',  -important => 1 },
  +    'usSO8' => { -host => 'dv8',  -important => 1 },
  +    'ixSOX' => { -host => 'dv16', -important => 1 },
  +    'usSO6' => { -host => 'dv13', -important => 0 },
   );
   
   my $io = new IO::File "<status.txt" || die;
  @@ -45,6 +45,7 @@
   $O .= "<table cellspacing=1 cellpadding=2 border=0 width=\"90%\">\n";
   my $ishead = 1;
   my @hostlist = ();
  +my @idlist = ();
   my @arch = ();
   my $dst_last = "";
   my %doing = ();
  @@ -57,6 +58,7 @@
       my ($name, $version, $release, $dst, $rel) = @line[0..4];
       if ($ishead) {
           my @ids = @line[5..$#line];
  +        @idlist = @ids;
           $ishead = 0;
           $O .= "<tr bgcolor=\"#000000\">\n";
           $O .= "<td align=center><font color=\"#ffffff\">Ok</font></td>";
  @@ -67,15 +69,15 @@
           $O .= "<td><font color=\"#ffffff\">$rel</font></td>";
           foreach my $id (@ids) {
               $O .= "<td width=30><font color=\"#ffffff\" 
size=\"-1\">$id</font></td>";
  -            push(@hostlist, $id2host{$id});
  +            push(@hostlist, $id2host{$id}->{-host});
           }
           $O .= "</tr>\n";
           foreach my $id (@ids) {
  -            my $host = $id2host{$id};
  +            my $host = $id2host{$id}->{-host};
               my $fn = (glob("status.log/processing.$host.*"))[0] || next;
               my $mtime = (stat($fn[0]))[9];
               #if ($mtime > time()-(10*60)) {
  -                my $io = new IO::File "<$fn" || next;
  +                my $io = new IO::File "<$fn" or next;
                   $doing{$host} = <$io>;
                   $doing{$host} =~ s|^\s*(\S+).*$|$1|s;
                   $io->close;
  @@ -109,22 +111,22 @@
   
               if ($host eq "OK") {
                   if (defined($doing{$hostlist[$n]}) and $doing{$hostlist[$n]} eq 
"$name-$version-$release") {
  -                    $L .= "<td bgcolor=\"#".($n < $major ? "f0f099" : "999933")."\" 
align=center>";
  +                    $L .= "<td bgcolor=\"#".($id2host{$idlist[$n]}->{-important} ? 
"f0f099" : "999933")."\" align=center>";
                       $L .= "<a href=\"status-log.cgi/".$log."\">" if ($#log >= 0);
                       $L .= "<img src=\"status.img/icon-dia.gif\" width=9 height=9 
alt=\"OK\" border=0>";
                       $L .= "</a>" if ($#log >= 0);
                   }
                   else {
  -                    $L .= "<td bgcolor=\"#".($n < $major ? "99cc99" : "336633")."\" 
align=center>";
  +                    $L .= "<td bgcolor=\"#".($id2host{$idlist[$n]}->{-important} ? 
"99cc99" : "336633")."\" align=center>";
                       $L .= "<a href=\"status-log.cgi/".$log."\">" if ($#log >= 0);
                       $L .= "<img src=\"status.img/icon-ok.gif\" width=9 height=9 
alt=\"OK\" border=0>";
                       $L .= "</a>" if ($#log >= 0);
                   }
               }
               elsif ($host eq "FAIL") {
  -                $ok = 0 if ($n < $major);
  +                $ok = 0 if ($id2host{$idlist[$n]}->{-important});
                   if (defined($doing{$hostlist[$n]}) and $doing{$hostlist[$n]} eq 
"$name-$version-$release") {
  -                    $L .= "<td width=30 bgcolor=\"#".($n < $major ? "f0f099" : 
"999933")."\" align=center>";
  +                    $L .= "<td width=30 
bgcolor=\"#".($id2host{$idlist[$n]}->{-important} ? "f0f099" : "999933")."\" 
align=center>";
                       $L .= "<a href=\"status-log.cgi/".$log."\">";
                       $mtime_srpm = 
(stat("/e/openpkg/ftp/current/SRC/$name-$version-$release.src.rpm"))[9];
                       $mtime_logf = (stat($log[0]))[9];
  @@ -133,7 +135,7 @@
                       $L .= "</a>";
                   }
                   else {
  -                    $L .= "<td width=30 bgcolor=\"#".($n < $major ? "ff9999" : 
"993333")."\" align=center>";
  +                    $L .= "<td width=30 
bgcolor=\"#".($id2host{$idlist[$n]}->{-important} ? "ff9999" : "993333")."\" 
align=center>";
                       $L .= "<a href=\"status-log.cgi/".$log."\">";
                       $mtime_srpm = 
(stat("/e/openpkg/ftp/current/SRC/$name-$version-$release.src.rpm"))[9];
                       $mtime_logf = (stat($log[0]))[9];
  @@ -144,14 +146,14 @@
                   }
               }
               elsif ($host eq "--") {
  -                $ok = 0 if ($n < $major);
  +                $ok = 0 if ($id2host{$idlist[$n]}->{-important});
                   if (defined($doing{$hostlist[$n]}) and $doing{$hostlist[$n]} eq 
"$name-$version-$release") {
  -                    $L .= "<td width=30 bgcolor=\"#".($n < $major ? "f0f099" : 
"999933")."\" align=center>";
  +                    $L .= "<td width=30 
bgcolor=\"#".($id2host{$idlist[$n]}->{-important} ? "f0f099" : "999933")."\" 
align=center>";
                       my $img = "icon-dia.gif";
                       $L .= "<img src=\"status.img/$img\" width=9 height=9 alt=\"--\" 
border=0>";
                   }
                   else {
  -                    $L .= "<td width=30 bgcolor=\"#".($n < $major ? "9999ff" : 
"000066")."\" align=center>";
  +                    $L .= "<td width=30 
bgcolor=\"#".($id2host{$idlist[$n]}->{-important} ? "9999ff" : "000066")."\" 
align=center>";
                       $L .= "<img src=\"status.img/icon-dot.gif\" width=9 height=9 
alt=\"--\" border=0>";
                   }
               }
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to