summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2013-01-17 00:18:06 +0000
committerPascal Terjan <pterjan@mageia.org>2013-01-17 00:18:06 +0000
commit8b6da873f77fa2329d5b6aac3b02a2d517c8226c (patch)
treeedb828de6c4b3ac64d6bd8edfd3b0d3936074f5b
parent52238360bcc5de2945430cbef1f7f08cde7d571b (diff)
downloadpkgsubmit-8b6da873f77fa2329d5b6aac3b02a2d517c8226c.tar
pkgsubmit-8b6da873f77fa2329d5b6aac3b02a2d517c8226c.tar.gz
pkgsubmit-8b6da873f77fa2329d5b6aac3b02a2d517c8226c.tar.bz2
pkgsubmit-8b6da873f77fa2329d5b6aac3b02a2d517c8226c.tar.xz
pkgsubmit-8b6da873f77fa2329d5b6aac3b02a2d517c8226c.zip
Add a simple version creating a fake status.log with packages still broken
-rw-r--r--autobuild/broken.php50
1 files changed, 50 insertions, 0 deletions
diff --git a/autobuild/broken.php b/autobuild/broken.php
new file mode 100644
index 0000000..68459f8
--- /dev/null
+++ b/autobuild/broken.php
@@ -0,0 +1,50 @@
+<?php
+header("Content-type: text/plain");
+
+$srpm_dir = '/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/';
+
+$run = readlink("cauldron/x86_64/core/latest");
+$packages = Array();
+if ($handle = opendir($srpm_dir)) {
+ while (false !== ($entry = readdir($handle))) {
+ if (preg_match("/(.*)-([^-]*-[^-]*mga)[1-9].src.rpm/", $entry, $matches)) {
+ $packages[$matches[1]] = $entry;
+ }
+ }
+ closedir($handle);
+}
+
+$failure = Array();
+
+$base_dir = "cauldron/x86_64/core/$run";
+
+$status_name = "$base_dir/status.core.log";
+
+$status_file = fopen($status_name, "r");
+while (!feof($status_file)) {
+ $line = fgets($status_file);
+ if (preg_match("/^(.*): (.*)$/", $line, $matches)) {
+ $rpm = $matches[1];
+ $status = $matches[2];
+ if ($status != "ok" && $status != "unknown" && $status != "not_on_this_arch"){
+ preg_match("/(.*)-([^-]*-[^-]*mga)[1-9].src.rpm/", $rpm, $matches);
+ $package = $matches[1];
+ $version = $matches[2];
+ if($packages[$package]) {
+ $build_stat = stat("$base_dir/$rpm");
+ $pkg_stat = stat($srpm_dir.$packages[$package]);
+ if ($pkg_stat['mtime'] <= $build_stat['mtime']) {
+ $failure[$rpm] = $status;
+ }
+ }
+ }
+ }
+}
+fclose($status_file);
+
+ksort($failure);
+
+foreach ($failure as $rpm => $error) {
+ echo "$rpm: $error\n";
+}
+?>