Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/web-scripts
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-01-23 11:42:16 +0100
committerErich Eckner <git@eckner.net>2018-01-23 11:42:16 +0100
commitb7d3486e4c401294182f38917dede3e48616df5e (patch)
treeb264eeecc689d082b3bb87a687b2ffa9b84e062f /web-scripts
parentfa31b12beae5c7b6a157dd3c9c7b534975e3e3b2 (diff)
web-scripts/broken-packages.php: much more functionality now
Diffstat (limited to 'web-scripts')
-rw-r--r--web-scripts/broken-packages.php64
1 files changed, 57 insertions, 7 deletions
diff --git a/web-scripts/broken-packages.php b/web-scripts/broken-packages.php
index f8a9eab..cccf18b 100644
--- a/web-scripts/broken-packages.php
+++ b/web-scripts/broken-packages.php
@@ -14,6 +14,8 @@ if ($mysql->connect_error) {
$result = $mysql -> query(
"SELECT " .
+ "`build_assignments`.`id`," .
+ "`build_assignments`.`is_blocked`," .
"`package_sources`.`pkgbase`," .
"`package_sources`.`git_revision`," .
"`package_sources`.`mod_git_revision`," .
@@ -21,7 +23,7 @@ $result = $mysql -> query(
"FROM `build_assignments` " .
"JOIN `package_sources` ON `build_assignments`.`package_source` = `package_sources`.`id` " .
"JOIN `upstream_repositories` ON `package_sources`.`upstream_package_repository` = `upstream_repositories`.`id` " .
- "WHERE `build_assignments`.`is_broken`"
+ "WHERE `build_assignments`.`is_broken` OR `build_assignments`.`is_blocked` IS NOT NULL"
);
if ($result -> num_rows > 0) {
print "<table>\n";
@@ -30,23 +32,71 @@ if ($result -> num_rows > 0) {
print "<th>git revision</th>";
print "<th>modification git revision</th>";
print "<th>package repository</th>";
-// print "<th>compilations</th>";
+ print "<th>compilations</th>";
// print "<th>dependent</th>";
-// print "<th>build error</th>";
-// print "<th>blocked</th>";
+ print "<th>build error</th>";
+ print "<th>blocked</th>";
print "</tr>\n";
while($row = $result->fetch_assoc()) {
+
+ $fail_result = $mysql -> query(
+ "SELECT " .
+ "`fail_reasons`.`name`, " .
+ "`failed_builds`.`log_file` " .
+ "FROM `failed_builds` " .
+ "JOIN `build_assignments` ON `failed_builds`.`build_assignment`=`build_assignments`.`id` ".
+ "JOIN `fail_reasons` ON `failed_builds`.`reason`=`fail_reasons`.`id` ".
+ "WHERE `build_assignments`.`id`=".$row["id"]." " .
+ "ORDER BY `failed_builds`.`date`"
+ );
+
+ unset($reasons);
+ unset($last_log);
+ $trials = $fail_result -> num_rows;
+ if ($trials > 0) {
+ while($fail_row = $fail_result->fetch_assoc()) {
+ $reasons[$fail_row["name"]]=$fail_row["name"];
+ $last_log=$fail_row["log_file"];
+ }
+ }
+ if (isset($reasons)) {
+ $to_print="";
+ foreach ($reasons as $reason) {
+ $to_print=$to_print.", ".$reason;
+ }
+ $fail_reasons=substr($to_print,2);
+ } else {
+ $fail_reasons="&nbsp;";
+ }
+
print "<tr>";
print "<td><a href=\"/graphs/".$row["pkgbase"].".png\">".$row["pkgbase"]."</a></td>";
print "<td><p style=\"font-size:8px\">".$row["git_revision"]."</p></td>";
print "<td><p style=\"font-size:8px\">".$row["mod_git_revision"]."</p></td>";
print "<td>".$row["name"]."</td>";
-// <td><a href="build-logs/error/sagemath-doc.b4604cdd084578c93db065037f5b027e50d3cf61.23974cf846b850fa9b272ee779d3c6e2dd5f18db.community.2017-12-16T08:53:14.build-log.gz">2</a></td>
+ if (isset($last_log))
+ print "<td><a href=\"/build-logs/error/".$last_log."\">". $trials ."</a></td>";
+ else
+ print "<td>". $trials ."</td>";
// <td>0</td>
-// <td>build()</td>
-// <td>wait for <a href="https://bugs.archlinux32.org/index.php?do=details&task_id=20">FS32#20</a></td>
+ print "<td>".$fail_reasons."</td>";
+ if ($row["is_blocked"]=="") {
+ $row["is_blocked"]="&nbsp;";
+ }
+ $row["is_blocked"] = preg_replace(
+ array (
+ "/FS32#(\\d+)/",
+ "/FS#(\\d+)/"
+ ),
+ array (
+ "<a href=\"https://bugs.archlinux32.org/index.php?do=details&task_id=$1\">$0</a>",
+ "<a href=\"https://bugs.archlinux.org/task/$1\">$0</a>"
+ ),
+ $row["is_blocked"]
+ );
+ print "<td>".$row["is_blocked"]."</td>";
print "</tr>\n";
}