diff options
author | Erich Eckner <git@eckner.net> | 2018-11-23 10:24:08 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-11-23 10:24:08 +0100 |
commit | 9374219cc93f5bb0279a184f4944c83b63cdeba1 (patch) | |
tree | f03d1db2ae3038918873e9aa4ef90ea2675976c4 /buildmaster | |
parent | 06e4f4ba9f0c0c575655478ed783265e7f2dddd0 (diff) | |
download | archweb32-9374219cc93f5bb0279a184f4944c83b63cdeba1.tar.xz |
buildmaster/mysql-issues.php: add output buffering
Diffstat (limited to 'buildmaster')
-rw-r--r-- | buildmaster/mysql-issues.php | 70 |
1 files changed, 34 insertions, 36 deletions
diff --git a/buildmaster/mysql-issues.php b/buildmaster/mysql-issues.php index 19ef55d..1ca07bc 100644 --- a/buildmaster/mysql-issues.php +++ b/buildmaster/mysql-issues.php @@ -10,6 +10,19 @@ require_once BASE . "/lib/mysql.php"; if (isset($_GET["ignore-i486"])) $ignore .= " AND `r_a`.`name` != \"i486\""; + ob_start(); + +?> +<html> + <head> + <title>More and less critical issues with the database</title> + <link rel="stylesheet" type="text/css" href="/static/style.css"> + </head> + <body> +<?php show_warning_on_offline_slave(); ?> + <a href="https://buildmaster.archlinux32.org/">Start page</a><br> +<?php + $result = mysql_run_query( "SELECT CONCAT(" . "`r_a`.`name`,\"/\"," . @@ -68,9 +81,22 @@ require_once BASE . "/lib/mysql.php"; "`install_targets`.`name`" ); - $serious_issues = array(); - while ( $row = $result -> fetch_assoc() ) - $serious_issues[] = $row; + print " Found " . count( $result -> num_rows ) . " serious issues.<br>\n"; + + while ( $row = $result -> fetch_assoc() ) { + if ($row["is_to_be_deleted"]==1) + print " <font color=\"#00ff00\">(marked as to-be-deleted) "; + else + print " <font color=\"#ff0000\">"; + print $row["pkgfile"] . " depends on " . $row["install_target"] . " which is not provided by any package"; + if (isset($row["subst_repository"])) + print " - but can be replaced by the one in " . $row["subst_repository"]; + elseif (isset($row["subst_buildlist"])) + print " - but is already rescheduled"; + print ".<br>"; + print "</font>\n"; + unset($row); + } $result = mysql_run_query( "SELECT CONCAT(" . @@ -132,48 +158,20 @@ require_once BASE . "/lib/mysql.php"; " ORDER BY `binary_packages_in_repositories`.`is_to_be_deleted`,`binary_packages`.`pkgname`,`install_targets`.`name`" ); - $stability_issues = array(); - while ( $row = $result -> fetch_assoc() ) - $stability_issues[] = $row; - -?> -<html> - <head> - <title>More and less critical issues with the database</title> - <link rel="stylesheet" type="text/css" href="/static/style.css"> - </head> - <body> -<?php show_warning_on_offline_slave(); ?> - <a href="https://buildmaster.archlinux32.org/">Start page</a><br> -<?php - - print " Found " . count( $serious_issues ) . " serious issues.<br>\n"; - - foreach ( $serious_issues as $row ) { - if ($row["is_to_be_deleted"]==1) - print " <font color=\"#00ff00\">(marked as to-be-deleted) "; - else - print " <font color=\"#ff0000\">"; - print $row["pkgfile"] . " depends on " . $row["install_target"] . " which is not provided by any package"; - if (isset($row["subst_repository"])) - print " - but can be replaced by the one in " . $row["subst_repository"]; - elseif (isset($row["subst_buildlist"])) - print " - but is already rescheduled"; - print ".<br>"; - print "</font>\n"; - } - - print " Found " . count( $stability_issues ) . " stability issues.<br>\n"; + print " Found " . count( $result -> num_rows ) . " stability issues.<br>\n"; - foreach ( $stability_issues as $row ) { + while ( $row = $result -> fetch_assoc() ) { if ($row["is_to_be_deleted"]==1) print " <font color=\"#00ff00\">(marked as to-be-deleted) "; else print " <font color=\"#800000\">"; print $row["pkgfile"] . " depends on " . $row["install_target"] . " which is not provided by any package installable from enabled " . $row["stability"] . " repositories.<br>"; print "</font>\n"; + unset($row); } + ob_end_flush(); + ?> </body> </html> |