summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--non-mandatory.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/non-mandatory.php b/non-mandatory.php
index c7f3654..f6f5129 100644
--- a/non-mandatory.php
+++ b/non-mandatory.php
@@ -62,8 +62,9 @@ echo "<table>\n";
$status_file = $upload_dir . '/failure/' . $p['path'] . '/log/status.log';
$status_line = trim(preg_replace('/.*: /', '', file_get_contents($status_file)));
if ($status_line == 'missing_dep') {
- $install_deps_files = glob($upload_dir . '/failure/' . $p['path'] . '/log/' . $p['package'] . '/install_deps*.log');
- $f = fopen($install_deps_files[0], "r");
+ $install_deps_files = glob($upload_dir . '/failure/' . $p['path'] . '/log/' . $p['package'] . '/install_deps*.log');
+ $install_deps_file = $install_deps_files[count($install_deps_files)-1];
+ $f = fopen($install_deps_file, "r");
$dep_line = "";
while(($line = fgets($f, 4096)) !== false) {
if(preg_match('/due to unsatisfied (.*)\)/', $line, $matches) == 1) {
@@ -71,7 +72,7 @@ echo "<table>\n";
}
}
fclose($f);
- $link = '/uploads/failure/' . $p['path'] . '/log/' . $p['package'] . '/' . basename($install_deps_files[0]);
+ $link = '/uploads/failure/' . $p['path'] . '/log/' . $p['package'] . '/' . basename($install_deps_file);
echo '<td><a rel="nofollow" href="' . $link . '">' . $status_line . '</a> ' . $dep_line . '</td>';
} elseif ($status_line == 'recreate_srpm_failure') {
$botcmd_files = glob($upload_dir . '/failure/' . $p['path'] . '/log/botcmd.*.log');