diff options
Diffstat (limited to 'lib.php')
-rw-r--r-- | lib.php | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -32,8 +32,8 @@ function get_submitted_packages($upload_dir, $max_modified) chdir($upload_dir); $matches = array(); - $all_files = shell_exec("find \( -name '*.rpm' -o -name '*.src.rpm.info' -o -name '*.lock' -o -name '*.done' -o -name '*.upload' -o -name '*.fail' \) -ctime -$max_modified -printf \"%p\t%T@\\n\""); - $re = "!^\./(\w+)/((\w+)/(\w+)/(\w+)/(\d+)\.(\w+)\.(\w+)\.(\d+))_?(.*)(\.src\.rpm(?:\.info)?|\.lock|\.done|\.upload|\.fail)\s+(\d+\.\d+)$!m"; + $all_files = shell_exec("find \( -name '*.rpm' -o -name '*.src.rpm.info' -o -name '*.lock' -o -name '*.done' -o -name '*.upload' -o -name '*.fail' -o -name '*.kill' \) -ctime -$max_modified -printf \"%p\t%T@\\n\""); + $re = "!^\./(\w+)/((\w+)/(\w+)/(\w+)/(\d+)\.(\w+)\.(\w+)\.(\d+))_?(.*)(\.src\.rpm(?:\.info)?|\.lock|\.done|\.upload|\.fail|\.kill)\s+(\d+\.\d+)$!m"; $r = preg_match_all($re, $all_files, $matches, @@ -136,10 +136,18 @@ function get_refined_packages_list($list_of_files, $package = null, $user = null if (!isset($pkgs[$key]['status']['fail'])) { $pkgs[$key]['status']['fail'] = array(); } - $pkgs[$key]['status']['fail'][$arch] = 1; + if (!isset($pkgs[$key]['status']['kill'][$arch])) { + $pkgs[$key]['status']['fail'][$arch] = 1; + } if (in_array($arch, $mandatory_arches) || $arch == 'noarch') { $status = 'failure'; } + } else if ($ext == '.kill') { + if (!isset($pkgs[$key]['status']['kill'])) { + $pkgs[$key]['status']['kill'] = array(); + } + $pkgs[$key]['status']['kill'][$arch] = 1; + unset($pkgs[$key]['status']['fail'][$arch]); } if ($status !== '') { |