Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/buildmaster
diff options
context:
space:
mode:
Diffstat (limited to 'buildmaster')
-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']);