diff options
author | Pascal Terjan <pterjan@mageia.org> | 2020-11-25 22:10:03 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2020-11-25 22:10:03 +0000 |
commit | d1e939580ceb38b2c83e4193cb1d99d55f05e7f2 (patch) | |
tree | 495b6011f7d89d5c5139a75c724e23370f8c1f35 | |
parent | 011a96f35dd7db3fbc802234a502e58a3e7d7580 (diff) | |
download | pkgsubmit-d1e939580ceb38b2c83e4193cb1d99d55f05e7f2.tar pkgsubmit-d1e939580ceb38b2c83e4193cb1d99d55f05e7f2.tar.gz pkgsubmit-d1e939580ceb38b2c83e4193cb1d99d55f05e7f2.tar.bz2 pkgsubmit-d1e939580ceb38b2c83e4193cb1d99d55f05e7f2.tar.xz pkgsubmit-d1e939580ceb38b2c83e4193cb1d99d55f05e7f2.zip |
Support .kill files
-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 !== '') { |