summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2013-01-16 23:41:40 +0000
committerPascal Terjan <pterjan@mageia.org>2013-01-16 23:41:40 +0000
commit25e95b2913504ebc2d4f05d4027f68ddf9e89309 (patch)
tree032e3da2f7ae0d28e80d4313afa1953310a1f743
parent69a4e0c876772e4cc2a670de22890d35b7ceedb9 (diff)
downloadpkgsubmit-25e95b2913504ebc2d4f05d4027f68ddf9e89309.tar
pkgsubmit-25e95b2913504ebc2d4f05d4027f68ddf9e89309.tar.gz
pkgsubmit-25e95b2913504ebc2d4f05d4027f68ddf9e89309.tar.bz2
pkgsubmit-25e95b2913504ebc2d4f05d4027f68ddf9e89309.tar.xz
pkgsubmit-25e95b2913504ebc2d4f05d4027f68ddf9e89309.zip
Use modification time to detect fixed packages instead of version, to support when it does not get changed
-rw-r--r--autobuild/results.php23
1 files changed, 15 insertions, 8 deletions
diff --git a/autobuild/results.php b/autobuild/results.php
index f86db10..eb0f013 100644
--- a/autobuild/results.php
+++ b/autobuild/results.php
@@ -24,11 +24,12 @@ foreach ($runs as $r) {
}
$prev = $r;
}
+
$packages = Array();
if ($handle = opendir('/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/')) {
while (false !== ($entry = readdir($handle))) {
if (preg_match("/(.*)-([^-]*-[^-]*mga)[1-9].src.rpm/", $entry, $matches)) {
- $packages[$matches[1]] = $matches[2];
+ $packages[$matches[1]] = $entry;
}
}
closedir($handle);
@@ -41,7 +42,7 @@ if ($prev) {
$status_file = fopen($status_name, "r");
while (!feof($status_file)) {
$line = fgets($status_file);
- if (preg_match("/^(.*)-[^-]*-[^-]*mga[1-9].src.rpm: (.*)$/", $line, $matches)) {
+ if (preg_match("/^(.*): (.*)$/", $line, $matches)) {
$rpm = $matches[1];
$status = $matches[2];
if ($status != "ok" && $status != "unknown" && $status != "not_on_this_arch") {
@@ -66,8 +67,11 @@ if (!file_exists($status_name)) {
echo "Invalid run";
exit;
}
-$status_file = fopen($status_name, "r");
+$stat = stat($status_name);
+$end_time = $stat['mtime'];
+
+$status_file = fopen($status_name, "r");
while (!feof($status_file)) {
$line = fgets($status_file);
if (preg_match("/^(.*): (.*)$/", $line, $matches)) {
@@ -78,12 +82,15 @@ while (!feof($status_file)) {
} elseif ($status != "unknown" && $status != "not_on_this_arch"){
$failure[$rpm] = $status;
preg_match("/(.*)-([^-]*-[^-]*mga)[1-9].src.rpm/", $rpm, $matches);
- if(!$packages[$matches[1]]) {
+ $package = $matches[1];
+ $version = $matches[2];
+ if(!$packages[$package]) {
$removed[$rpm] = 1;
- } elseif ($packages[$matches[1]] > $matches[2]) {
- $fixed[$rpm] = 1;
- } elseif ($prev_failure[$matches[1]] != 1) {
- $broken[$rpm] = 1;
+ } else {
+ $stat = stat('/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/'.$packages[$package]);
+ if ($stat['mtime'] > $end_time) {
+ $fixed[$rpm] = 1;
+ }
}
}
}