summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2014-09-13 00:44:47 +0200
committerDan Fandrich <dan@coneharvesters.com>2020-03-26 22:18:10 +0100
commit6e719bb97ca94c205e694bab9fd1def07725b3fd (patch)
tree7a41df2b781dff18bc1b8b4b8f21253c9d8334dd
parentda1786eda289a8dd1c8b1011249e16f4b8bed51b (diff)
downloadpkgsubmit-6e719bb97ca94c205e694bab9fd1def07725b3fd.tar
pkgsubmit-6e719bb97ca94c205e694bab9fd1def07725b3fd.tar.gz
pkgsubmit-6e719bb97ca94c205e694bab9fd1def07725b3fd.tar.bz2
pkgsubmit-6e719bb97ca94c205e694bab9fd1def07725b3fd.tar.xz
pkgsubmit-6e719bb97ca94c205e694bab9fd1def07725b3fd.zip
Show icons for some programming language dependencies
Search the package install log to find some dependencies that get turned into icons next to the package names. This should give maintainers a better clue about whether they they have the skills or interest to tackle a package build issue. Logos are displayed only for packages that are failing and have not been fixed yet.
-rw-r--r--autobuild/icons/build-ant.pngbin0 -> 766 bytes
-rw-r--r--autobuild/icons/build-cmake.pngbin0 -> 795 bytes
-rw-r--r--autobuild/icons/build-maven.pngbin0 -> 772 bytes
-rw-r--r--autobuild/icons/build-scons.pngbin0 -> 585 bytes
-rw-r--r--autobuild/icons/lang-dotnet.pngbin0 -> 340 bytes
-rw-r--r--autobuild/icons/lang-java.pngbin0 -> 510 bytes
-rw-r--r--autobuild/icons/lang-lua.pngbin0 -> 878 bytes
-rw-r--r--autobuild/icons/lang-pascal.pngbin0 -> 777 bytes
-rw-r--r--autobuild/icons/lang-perl.pngbin0 -> 773 bytes
-rw-r--r--autobuild/icons/lang-php.pngbin0 -> 495 bytes
-rw-r--r--autobuild/icons/lang-python.pngbin0 -> 745 bytes
-rw-r--r--autobuild/icons/lang-ruby.pngbin0 -> 933 bytes
-rw-r--r--autobuild/results.php44
13 files changed, 39 insertions, 5 deletions
diff --git a/autobuild/icons/build-ant.png b/autobuild/icons/build-ant.png
new file mode 100644
index 0000000..0b1c81e
--- /dev/null
+++ b/autobuild/icons/build-ant.png
Binary files differ
diff --git a/autobuild/icons/build-cmake.png b/autobuild/icons/build-cmake.png
new file mode 100644
index 0000000..9edf330
--- /dev/null
+++ b/autobuild/icons/build-cmake.png
Binary files differ
diff --git a/autobuild/icons/build-maven.png b/autobuild/icons/build-maven.png
new file mode 100644
index 0000000..11a2d82
--- /dev/null
+++ b/autobuild/icons/build-maven.png
Binary files differ
diff --git a/autobuild/icons/build-scons.png b/autobuild/icons/build-scons.png
new file mode 100644
index 0000000..a38d57c
--- /dev/null
+++ b/autobuild/icons/build-scons.png
Binary files differ
diff --git a/autobuild/icons/lang-dotnet.png b/autobuild/icons/lang-dotnet.png
new file mode 100644
index 0000000..676b0c0
--- /dev/null
+++ b/autobuild/icons/lang-dotnet.png
Binary files differ
diff --git a/autobuild/icons/lang-java.png b/autobuild/icons/lang-java.png
new file mode 100644
index 0000000..94ee2c4
--- /dev/null
+++ b/autobuild/icons/lang-java.png
Binary files differ
diff --git a/autobuild/icons/lang-lua.png b/autobuild/icons/lang-lua.png
new file mode 100644
index 0000000..12b4c83
--- /dev/null
+++ b/autobuild/icons/lang-lua.png
Binary files differ
diff --git a/autobuild/icons/lang-pascal.png b/autobuild/icons/lang-pascal.png
new file mode 100644
index 0000000..e6dc736
--- /dev/null
+++ b/autobuild/icons/lang-pascal.png
Binary files differ
diff --git a/autobuild/icons/lang-perl.png b/autobuild/icons/lang-perl.png
new file mode 100644
index 0000000..b1a12bd
--- /dev/null
+++ b/autobuild/icons/lang-perl.png
Binary files differ
diff --git a/autobuild/icons/lang-php.png b/autobuild/icons/lang-php.png
new file mode 100644
index 0000000..60f7c47
--- /dev/null
+++ b/autobuild/icons/lang-php.png
Binary files differ
diff --git a/autobuild/icons/lang-python.png b/autobuild/icons/lang-python.png
new file mode 100644
index 0000000..7e600a7
--- /dev/null
+++ b/autobuild/icons/lang-python.png
Binary files differ
diff --git a/autobuild/icons/lang-ruby.png b/autobuild/icons/lang-ruby.png
new file mode 100644
index 0000000..7b1daa2
--- /dev/null
+++ b/autobuild/icons/lang-ruby.png
Binary files differ
diff --git a/autobuild/results.php b/autobuild/results.php
index e3ab4d1..9a81622 100644
--- a/autobuild/results.php
+++ b/autobuild/results.php
@@ -40,6 +40,7 @@ foreach ($runs as $r) {
}
$prev = $r;
}
+$runepoc = strtotime($run);
$packages = Array();
if ($handle = opendir('/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/')) {
@@ -192,10 +193,15 @@ function is_flaky($history) {
return $num_change >= 4;
}
-function get_build_history($package) {
+function get_package_id($package) {
+ global $db;
+ return $db->querySingle("SELECT Id FROM Packages WHERE Name = '$package'");
+}
+
+function get_build_history($package_id) {
global $db;
- $package_id = $db->querySingle("SELECT Id FROM Packages WHERE Name = '$package'");
if ($package_id) {
+ # TODO: optimize by retrieving Runs.Id once at the start
$result = $db->query("SELECT ResultValues.Name FROM Runs, Results, ResultValues WHERE Runs.Id = Results.Run AND Results.Result = ResultValues.Id AND Results.Package = '$package_id' ORDER BY Start DESC LIMIT 10");
if ($result) {
$build_stats = Array();
@@ -208,6 +214,15 @@ function get_build_history($package) {
return false;
}
+function get_package_attributes($package_id) {
+ global $db, $runepoc;
+ if ($package_id) {
+ # TODO: optimize by retrieving Runs.Id once at the start
+ $attributes = $db->querySingle("SELECT Attr FROM Attributes, Runs WHERE Runs.Id = Attributes.Run AND Runs.Start = $runepoc AND Attributes.Package = '$package_id';");
+ }
+ return $attributes;
+}
+
echo "<form><select name='run' onChange='document.location.href=\"".$_SERVER["PHP_SELF"]."?run=\"+this.form.run.value'>";
foreach ($runs as $r) {
$in_progress = ($r > $latest) ? ' (in progress)' : '';
@@ -234,15 +249,34 @@ foreach ($failure as $rpm => $error) {
if (file_exists("icons/error-$error.png")) {
$error_html = "<img src='icons/error-$error.png' title='$error'/>";
}
- $history = get_build_history($parsed['package']);
+ $packageid = get_package_id($parsed['package']);
+ $history = get_build_history($packageid);
if (is_flaky($history)) {
$history_link = $history_link . " <img src='icons/warning-flaky.png' title='Flaky build' />";
}
+ $language_link = "";
+ if (!$fixed[$rpm]) {
+ $attributes = get_package_attributes($packageid);
+ if ($attributes) {
+ # Attributes are space separated words of the form "lang_php"
+ foreach (explode(" ", $attributes) as $attr) {
+ $attrname = ucfirst(explode("_", $attr)[1]);
+ $icon_fn = "icons/" . str_replace("_", "-", $attr) . ".png";
+ if (file_exists($icon_fn)) {
+ $language_link = $language_link . " <img src='$icon_fn' " .
+ "title='$attrname dependency' />";
+ } else {
+ $language_link = $language_link . " [$attrname dep]";
+ }
+ }
+ }
+ }
if (file_exists("$base_dir/$rpm/")) {
- echo "<li>$error_html <a href='$base_dir/$rpm/'>$rpm</a> $status_html $history_link</li>\n";
+ echo "<li>$error_html <a href='$base_dir/$rpm/'>$rpm</a>";
} else {
- echo "<li>$error_html $rpm $status_html $history_link</li>\n";
+ echo "<li>$error_html $rpm";
}
+ echo " $status_html $history_link$language_link</li>\n";
}
$db->close();
?>