\n";
foreach ($pkgs as $key => $p) {
if (trim($p['package']) == '') {
continue;
}
if ($p['type'] != 'uploaded') {
continue;
}
$failed_arches = array_keys($p['status']['fail']);
if (empty($failed_arches)) {
continue;
}
if(!file_exists(get_srpm_path($p['version'], $p['media'], $p['section'], $p['package']))) {
continue;
}
echo '
' . $p['package'] . ' | ';
$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/*/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) {
$dep_line = $matches[1];
}
}
fclose($f);
$link = '/uploads/failure/' . $p['path'] . '/log/' . $p['package'] . '/' . basename($install_deps_file);
echo '' . $status_line . ' ' . $dep_line . ' | ';
} elseif ($status_line == 'recreate_srpm_failure') {
$botcmd_files = glob($upload_dir . '/failure/' . $p['path'] . '/log/botcmd.*.log');
$link = '/uploads/failure/' . $p['path'] . '/log/' . basename($botcmd_files[0]);
echo '' . $status_line . ' | ';
} else {
$link = '/uploads/failure/' . $p['path'] . '/log/' . $p['package'];
echo '' . $status_line . ' | ';
}
echo "
\n";
}
echo "\n";
?>