From 4d8eaee829e81cf25b5704a53bd4f5b482faa3a6 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Thu, 27 Aug 2020 20:15:37 +0000 Subject: Fix broken.php to not rely on buildtime, only on having a different version available --- autobuild/broken.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/autobuild/broken.php b/autobuild/broken.php index 405abaa..aab5185 100644 --- a/autobuild/broken.php +++ b/autobuild/broken.php @@ -8,7 +8,7 @@ $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; + $packages[$matches[1]] = $matches[2]; } } closedir($handle); @@ -31,12 +31,8 @@ if ($status_file) { 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; - } + if($packages[$package] && $packages[$package] == $version) { + $failure[$rpm] = $status; } } } -- cgit v1.2.1