From 2222561789db0bb1f9e94f265905a74f5ef6ee9e Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Fri, 11 Nov 2022 14:32:09 +0000 Subject: Allow filtering by maintainer --- autobuild/results.php | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/autobuild/results.php b/autobuild/results.php index 3cbc476..9574f5d 100644 --- a/autobuild/results.php +++ b/autobuild/results.php @@ -256,6 +256,26 @@ function get_all_attributes() { return $attr_types; } +function get_package_maintainers() { + global $failure; + $pkgs = Array(); + $maintdb = file('/var/www/bs/data/maintdb.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + foreach ($maintdb as $l) { + list($pkg, $m) = explode(" ", $l); + if ($m == "") { + $m = "nobody"; + } + $pkgs[$pkg] = $m; + } + $failedpkgs = Array(); + foreach ($failure as $rpm => $error) { + $parsed = parse_package($rpm); + $pkg = $parsed["package"]; + $failedpkgs[$pkg] = $pkgs[$pkg]; + } + return $failedpkgs; +} + echo "

$title

\n"; echo "
\n"; @@ -299,6 +323,20 @@ if ($all_attrs) { } echo "
\n"; } + echo "maintainer: "; + $filters["maintainer"] = Array(); + echo "\n"; echo "\n"; echo "
"; } @@ -329,6 +367,12 @@ foreach ($failure as $rpm => $error) { $errors = ""; $stage = ""; $attributes = get_package_attributes($packageid); + if (isset($pkg_maintainers[$parsed['package']])) { + $maintainer = $pkg_maintainers[$parsed['package']]; + $attributes .= " maintainer_$maintainer"; + } else { + $maintainer = "nobody"; + } if ($attributes) { # Attributes are space separated words of the form "TYPE_SPECIFIER", e.g., "lang_php" # Types are currently build (use of a particular build system), -- cgit v1.2.1