/[soft]/build_system/web/autobuild/results.php
ViewVC logotype

Diff of /build_system/web/autobuild/results.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7081 by pterjan, Mon Jan 14 01:11:08 2013 UTC revision 7123 by pterjan, Wed Jan 16 23:41:40 2013 UTC
# Line 24  foreach ($runs as $r) { Line 24  foreach ($runs as $r) {
24          }          }
25          $prev = $r;          $prev = $r;
26  }  }
27    
28  $packages = Array();  $packages = Array();
29  if ($handle = opendir('/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/')) {  if ($handle = opendir('/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/')) {
30          while (false !== ($entry = readdir($handle))) {          while (false !== ($entry = readdir($handle))) {
31                  if (preg_match("/(.*)-([^-]*-[^-]*mga)[1-9].src.rpm/", $entry, $matches)) {                  if (preg_match("/(.*)-([^-]*-[^-]*mga)[1-9].src.rpm/", $entry, $matches)) {
32                          $packages[$matches[1]] = $matches[2];                          $packages[$matches[1]] = $entry;
33                  }                  }
34          }          }
35          closedir($handle);          closedir($handle);
# Line 41  if ($prev) { Line 42  if ($prev) {
42          $status_file = fopen($status_name, "r");          $status_file = fopen($status_name, "r");
43          while (!feof($status_file)) {          while (!feof($status_file)) {
44                  $line = fgets($status_file);                  $line = fgets($status_file);
45                  if (preg_match("/^(.*)-[^-]*-[^-]*mga[1-9].src.rpm: (.*)$/", $line, $matches)) {                  if (preg_match("/^(.*): (.*)$/", $line, $matches)) {
46                          $rpm = $matches[1];                          $rpm = $matches[1];
47                          $status = $matches[2];                          $status = $matches[2];
48                          if ($status != "ok" && $status != "unknown" && $status != "not_on_this_arch") {                          if ($status != "ok" && $status != "unknown" && $status != "not_on_this_arch") {
# Line 66  if (!file_exists($status_name)) { Line 67  if (!file_exists($status_name)) {
67          echo "Invalid run";          echo "Invalid run";
68          exit;          exit;
69  }  }
 $status_file = fopen($status_name, "r");  
70    
71    $stat = stat($status_name);
72    $end_time = $stat['mtime'];
73    
74    $status_file = fopen($status_name, "r");
75  while (!feof($status_file)) {  while (!feof($status_file)) {
76          $line = fgets($status_file);          $line = fgets($status_file);
77          if (preg_match("/^(.*): (.*)$/", $line, $matches)) {          if (preg_match("/^(.*): (.*)$/", $line, $matches)) {
# Line 78  while (!feof($status_file)) { Line 82  while (!feof($status_file)) {
82                  } elseif ($status != "unknown" && $status != "not_on_this_arch"){                  } elseif ($status != "unknown" && $status != "not_on_this_arch"){
83                          $failure[$rpm] = $status;                          $failure[$rpm] = $status;
84                          preg_match("/(.*)-([^-]*-[^-]*mga)[1-9].src.rpm/", $rpm, $matches);                          preg_match("/(.*)-([^-]*-[^-]*mga)[1-9].src.rpm/", $rpm, $matches);
85                          if(!$packages[$matches[1]]) {                          $package = $matches[1];
86                            $version = $matches[2];
87                            if(!$packages[$package]) {
88                                  $removed[$rpm] = 1;                                  $removed[$rpm] = 1;
89                          } elseif ($packages[$matches[1]] > $matches[2]) {                          } else {
90                                  $fixed[$rpm] = 1;                                  $stat = stat('/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/'.$packages[$package]);
91                          } elseif ($prev_failure[$matches[1]] != 1) {                                  if ($stat['mtime'] > $end_time) {
92                                  $broken[$rpm]  = 1;                                          $fixed[$rpm] = 1;
93                                    }
94                          }                          }
95                  }                  }
96          }          }

Legend:
Removed from v.7081  
changed lines
  Added in v.7123

  ViewVC Help
Powered by ViewVC 1.1.26