diff options
author | Pascal Terjan <pterjan@mageia.org> | 2020-08-27 20:15:37 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2020-08-27 20:15:37 +0000 |
commit | 4d8eaee829e81cf25b5704a53bd4f5b482faa3a6 (patch) | |
tree | 3a732eccec0b25222f843d3b0590910cc40a39c7 /autobuild | |
parent | 183a6fab930f77baf8491d4f596ce02b62208f28 (diff) | |
download | pkgsubmit-4d8eaee829e81cf25b5704a53bd4f5b482faa3a6.tar pkgsubmit-4d8eaee829e81cf25b5704a53bd4f5b482faa3a6.tar.gz pkgsubmit-4d8eaee829e81cf25b5704a53bd4f5b482faa3a6.tar.bz2 pkgsubmit-4d8eaee829e81cf25b5704a53bd4f5b482faa3a6.tar.xz pkgsubmit-4d8eaee829e81cf25b5704a53bd4f5b482faa3a6.zip |
Fix broken.php to not rely on buildtime, only on having a different version available
Diffstat (limited to 'autobuild')
-rw-r--r-- | autobuild/broken.php | 10 |
1 files 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; } } } |