summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2020-04-15 20:00:32 +0000
committerPascal Terjan <pterjan@mageia.org>2020-04-15 20:03:05 +0000
commit6287f4ade50c6e836673019428cc744dc9da45f3 (patch)
tree2d7245640765ff909954c015ff9c15f90ad61a1c
parentc37220777b02f52592b16b81ccd43df1ab420c05 (diff)
downloadpkgsubmit-6287f4ade50c6e836673019428cc744dc9da45f3.tar
pkgsubmit-6287f4ade50c6e836673019428cc744dc9da45f3.tar.gz
pkgsubmit-6287f4ade50c6e836673019428cc744dc9da45f3.tar.bz2
pkgsubmit-6287f4ade50c6e836673019428cc744dc9da45f3.tar.xz
pkgsubmit-6287f4ade50c6e836673019428cc744dc9da45f3.zip
Improve known error display
Drop spurious [ dep] when there is a space at the beginning/end of the attribute string and make the text more understandable in all cases.
-rw-r--r--autobuild/results.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/autobuild/results.php b/autobuild/results.php
index 7614237..21afcb8 100644
--- a/autobuild/results.php
+++ b/autobuild/results.php
@@ -262,16 +262,21 @@ foreach ($failure as $rpm => $error) {
# Types are currently build (use of a particular build system),
# lang (use of a programming language) or err (a common build error).
foreach (explode(" ", $attributes) as $attr) {
+ if (empty($attr)) {
+ continue;
+ }
$attrname = ucfirst(explode("_", $attr)[1]);
$icon_fn = "icons/" . str_replace("_", "-", $attr) . ".png";
if (file_exists($icon_fn)) {
$attr_link = $attr_link . " <img src='$icon_fn' " .
"title='$attrname dependency' />";
- } else if (substr($attr, 0, 4) === "err_") {
- # TODO: create link into wiki with information about these errors
- $attr_link = $attr_link . " [$attrname err]";
} else {
- $attr_link = $attr_link . " [$attrname dep]";
+ if (substr($attr, 0, 4) === "err_") {
+ # TODO: create link into wiki with information about these errors
+ $attr_link = $attr_link . " [Common Error: $attrname]";
+ } else {
+ $attr_link = $attr_link . " [$attr]";
+ }
}
}
}