summaryrefslogtreecommitdiffstats
path: root/lib.php
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2020-11-25 22:10:03 +0000
committerPascal Terjan <pterjan@mageia.org>2020-11-25 22:10:03 +0000
commitd1e939580ceb38b2c83e4193cb1d99d55f05e7f2 (patch)
tree495b6011f7d89d5c5139a75c724e23370f8c1f35 /lib.php
parent011a96f35dd7db3fbc802234a502e58a3e7d7580 (diff)
downloadpkgsubmit-d1e939580ceb38b2c83e4193cb1d99d55f05e7f2.tar
pkgsubmit-d1e939580ceb38b2c83e4193cb1d99d55f05e7f2.tar.gz
pkgsubmit-d1e939580ceb38b2c83e4193cb1d99d55f05e7f2.tar.bz2
pkgsubmit-d1e939580ceb38b2c83e4193cb1d99d55f05e7f2.tar.xz
pkgsubmit-d1e939580ceb38b2c83e4193cb1d99d55f05e7f2.zip
Support .kill files
Diffstat (limited to 'lib.php')
-rw-r--r--lib.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib.php b/lib.php
index 258710d..dac2441 100644
--- a/lib.php
+++ b/lib.php
@@ -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 !== '') {