From 754473b9fc5a3f0171164d44112986cfd3b59e67 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Mon, 5 Jul 2021 09:48:30 +0000 Subject: Avoid a warning when logs are deleted --- autobuild/results.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/autobuild/results.php b/autobuild/results.php index c11f5a9..f2dfa18 100644 --- a/autobuild/results.php +++ b/autobuild/results.php @@ -126,12 +126,18 @@ while (!feof($status_file)) { if(!array_key_exists($package, $packages)) { $removed[$rpm] = 1; } else { - $pkg_stat = stat('/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/'.$packages[$package]); # For recreate_srpm_failure, $rpm is the one that was in the repo # For other failures, mga release may be incorrect so use something less reliable - if (($status == 'recreate_srpm_failure' && $rpm != $packages[$package]) - || ($pkg_stat['mtime'] > $start_time)) { + if ($status == 'recreate_srpm_failure' && $rpm != $packages[$package]) { $fixed[$rpm] = 1; + } else { + $file = '/distrib/bootstrap/distrib/cauldron/SRPMS/core/release/' . $packages[$package]; + if (file_exists($file)) { + $pkg_stat = stat($file); + if ($pkg_stat['mtime'] > $start_time) { + $fixed[$rpm] = 1; + } + } } } } -- cgit v1.2.1