75 |
if ($status == "ok") { |
if ($status == "ok") { |
76 |
array_push($success, $rpm); |
array_push($success, $rpm); |
77 |
} elseif ($status != "unknown" && $status != "not_on_this_arch"){ |
} elseif ($status != "unknown" && $status != "not_on_this_arch"){ |
78 |
array_push($failure, $rpm); |
$failure[$rpm] = $status; |
79 |
preg_match("/(.*)-([^-]*-[^-]*mga)[1-9].src.rpm/", $rpm, $matches); |
preg_match("/(.*)-([^-]*-[^-]*mga)[1-9].src.rpm/", $rpm, $matches); |
80 |
if(!$packages[$matches[1]]) { |
if(!$packages[$matches[1]]) { |
81 |
$removed[$rpm] = 1; |
$removed[$rpm] = 1; |
88 |
fclose($status_file); |
fclose($status_file); |
89 |
|
|
90 |
sort($success); |
sort($success); |
91 |
sort($failure); |
ksort($failure); |
92 |
|
|
93 |
$nb_failed = count($failure); |
$nb_failed = count($failure); |
94 |
$nb_success = count($success); |
$nb_success = count($success); |
116 |
echo "</div>\n"; |
echo "</div>\n"; |
117 |
echo "<h1>$succes_percent% Success</h1>\n"; |
echo "<h1>$succes_percent% Success</h1>\n"; |
118 |
echo "$nb_fixed packages have been fixed since this run and $nb_removed have been removed.<br/> If no new package was broken, success rate next time should be $estimated_percent%.<br/>\n"; |
echo "$nb_fixed packages have been fixed since this run and $nb_removed have been removed.<br/> If no new package was broken, success rate next time should be $estimated_percent%.<br/>\n"; |
119 |
echo "<div style='float:left'><h1>Failed builds ($nb_failed/$nb_tried):</h1><ul>"; |
echo "<div style='float:left'><h1>Failed builds ($nb_failed/$nb_tried):</h1><ul style='list-style:none;'>"; |
120 |
|
|
121 |
foreach ($failure as $rpm) { |
foreach ($failure as $rpm => $error) { |
122 |
$status = ""; |
$status_html = ""; |
123 |
if ($fixed[$rpm]) { |
if ($fixed[$rpm]) { |
124 |
$status = " <span style='color:green;'><b>Fixed!</b></span>"; |
$status_html = " <img src='icons/state-fixed.png' title='Fixed!' />"; |
125 |
} elseif ($removed[$rpm]) { |
} elseif ($removed[$rpm]) { |
126 |
$status = " <span style='color:yellow;'><b>Removed</b></span>"; |
$status_html = " <img src='icons/state-removed.png' title='Removed' />"; |
127 |
} elseif ($prev && !$prev_failure[$rpm]) { |
} elseif ($prev && !$prev_failure[$rpm]) { |
128 |
$status = " <span style='color:red;'><b>New!</b></span>"; |
$status_html = " <img src='icons/state-new.png' title='New!' />"; |
129 |
|
} |
130 |
|
$error_html = $error; |
131 |
|
if (file_exists("icons/error-$error.png")) { |
132 |
|
$error_html = "<img src='icons/error-$error.png' title='$error'/>"; |
133 |
} |
} |
134 |
if (file_exists("$base_dir/$rpm/")) { |
if (file_exists("$base_dir/$rpm/")) { |
135 |
echo "<li><a href='$base_dir/$rpm/'>$rpm</a>$status</li>\n"; |
echo "<li>$error_html <a href='$base_dir/$rpm/'>$rpm</a> $status_html</li>\n"; |
136 |
} else { |
} else { |
137 |
echo "<li>$rpm $status</li>\n"; |
echo "<li>$error_html $rpm $status_html</li>\n"; |
138 |
} |
} |
139 |
} |
} |
140 |
|
|
141 |
echo "</ul></div><div style='float:right'><h1>Successful builds ($nb_success/$nb_tried):</h1><ul>"; |
echo "</ul></div><div style='float:right'><h1>Successful builds ($nb_success/$nb_tried):</h1><ul>"; |
142 |
|
|
143 |
foreach ($success as $rpm) { |
foreach ($success as $rpm) { |
144 |
echo "<li><a href='$base_dir/$rpm/'>$rpm</a></li>\n"; |
if (file_exists("$base_dir/$rpm/")) { |
145 |
|
echo "<li><a href='$base_dir/$rpm/'>$rpm</a></li>\n"; |
146 |
|
} else { |
147 |
|
echo "<li>$rpm</li>\n"; |
148 |
|
} |
149 |
} |
} |
150 |
|
|
151 |
?> |
?> |