summaryrefslogtreecommitdiffstats
path: root/autobuild/results.php
diff options
context:
space:
mode:
Diffstat (limited to 'autobuild/results.php')
-rw-r--r--autobuild/results.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/autobuild/results.php b/autobuild/results.php
index f2dfa18..da18802 100644
--- a/autobuild/results.php
+++ b/autobuild/results.php
@@ -67,17 +67,20 @@ $prev_failure = Array();
if ($prev) {
$status_name = array_shift(glob("cauldron/*/core/$prev/status.core.log"));
$status_file = fopen($status_name, "r");
- while (!feof($status_file)) {
- $line = fgets($status_file);
- if (preg_match("/^(.*): (.*)$/", $line, $matches)) {
- $rpm = parse_package($matches[1]);
- $status = $matches[2];
- if ($status != "ok" && $status != "unknown" && $status != "not_on_this_arch") {
- $prev_failure[$rpm['package']] = 1;
+ if ($status_file !== false) {
+ // The file should always be there but better not get an infinite loop flooding the logs when it disappears
+ while (!feof($status_file)) {
+ $line = fgets($status_file);
+ if (preg_match("/^(.*): (.*)$/", $line, $matches)) {
+ $rpm = parse_package($matches[1]);
+ $status = $matches[2];
+ if ($status != "ok" && $status != "unknown" && $status != "not_on_this_arch") {
+ $prev_failure[$rpm['package']] = 1;
+ }
}
}
+ fclose($status_file);
}
- fclose($status_file);
}
$success = Array();