Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/buildmaster/build-log.php
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-07-06 21:16:28 +0200
committerErich Eckner <git@eckner.net>2019-07-06 21:16:28 +0200
commitdd6498966b6f4fba0c23464554529aaebb0398f5 (patch)
tree062694b3351a6a0d50f134705e0c53a075c16bf3 /buildmaster/build-log.php
parent5447bb29af07d712dc32d182b8c25d63ca477bce (diff)
buildmaster/build-log.php new
Diffstat (limited to 'buildmaster/build-log.php')
-rw-r--r--buildmaster/build-log.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/buildmaster/build-log.php b/buildmaster/build-log.php
new file mode 100644
index 0000000..3cd0051
--- /dev/null
+++ b/buildmaster/build-log.php
@@ -0,0 +1,32 @@
+<?php
+require_once "../init.php";
+
+require_once BASE . "/lib/helper.php";
+require_once BASE . "/lib/mysql.php";
+
+$extra_joins = '';
+$filter = 'WHERE 1';
+
+if (array_key_exists('a', $_GET)) {
+ $extra_joins .= mysql_join_build_assignments_architectures();
+ $filter .= ' AND `architectures`.`name`=from_base64("' . base64_encode($_GET['a']) . '")';
+}
+
+if (array_key_exists('p', $_GET)) {
+ $extra_joins .= mysql_join_build_assignments_package_sources();
+ $filter .= ' AND `package_sources`.`pkgbase`=from_base64("' . base64_encode($_GET['p']) . '")';
+}
+
+$result = mysql_run_query(
+ 'SELECT `failed_builds`.`log_file` FROM `failed_builds`' .
+ mysql_join_failed_builds_build_assignments() .
+ $extra_joins .
+ $filter .
+ ' ORDER BY `failed_builds`.`date` DESC' .
+ ' LIMIT 1'
+);
+
+$result = $result -> fetch_assoc();
+
+header('HTTP/1.1 303 See Other');
+header('Location: https://buildmaster.archlinux32.org/build-logs/error/' . $result['log_file']);