summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2012-01-22 15:46:02 +0000
committerPascal Terjan <pterjan@mageia.org>2012-01-22 15:46:02 +0000
commite7a2acd22e9eb23cae3e998e5a6c730fbc42b3c0 (patch)
tree0941277783fdd3b4afb0004bf4e11b6da772def9 /index.php
parent36604b2794590431777fa0c59eb45a1d7864933f (diff)
downloadpkgsubmit-e7a2acd22e9eb23cae3e998e5a6c730fbc42b3c0.tar
pkgsubmit-e7a2acd22e9eb23cae3e998e5a6c730fbc42b3c0.tar.gz
pkgsubmit-e7a2acd22e9eb23cae3e998e5a6c730fbc42b3c0.tar.bz2
pkgsubmit-e7a2acd22e9eb23cae3e998e5a6c730fbc42b3c0.tar.xz
pkgsubmit-e7a2acd22e9eb23cae3e998e5a6c730fbc42b3c0.zip
Get rid of youri stateand use new .upload file to only mark a package uploaded when it really was
Diffstat (limited to 'index.php')
-rw-r--r--index.php19
1 files changed, 6 insertions, 13 deletions
diff --git a/index.php b/index.php
index 245e877..3d59b24 100644
--- a/index.php
+++ b/index.php
@@ -34,12 +34,8 @@ error_reporting(E_ALL);
function pkg_gettype($pkg) {
if (array_key_exists("rejected", $pkg["status"]))
return "rejected";
- if (array_key_exists("youri", $pkg["status"])) {
- if (array_key_exists("src", $pkg["status"]))
- return "youri";
- else
- return "uploaded";
- }
+ if (array_key_exists("upload", $pkg["status"]))
+ return "uploaded";
if (array_key_exists("failure", $pkg["status"]))
return "failure";
if (array_key_exists("done", $pkg["status"]))
@@ -125,8 +121,8 @@ $unmaintained = file('unmaintained.txt');
chdir($upload_dir);
-$all_files = shell_exec("find \( -name '*.rpm' -o -name '*.src.rpm.info' -o -name '*.youri' -o -name '*.lock' -o -name '*.done' \) -ctime -$max_modified -printf \"%p\t%T@\\n\"");
-$re = "!^\./(\w+)/((\w+)/(\w+)/(\w+)/(\d+)\.(\w+)\.(\w+)\.(\d+))_?(.*)(\.src\.rpm(?:\.info)?|\.youri|\.lock|\.done)\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' \) -ctime -$max_modified -printf \"%p\t%T@\\n\"");
+$re = "!^\./(\w+)/((\w+)/(\w+)/(\w+)/(\d+)\.(\w+)\.(\w+)\.(\d+))_?(.*)(\.src\.rpm(?:\.info)?|\.lock|\.done|\.upload)\s+(\d+\.\d+)$!m";
$r = preg_match_all($re,
$all_files,
$matches,
@@ -168,8 +164,8 @@ foreach ($matches as $val) {
$pkgs[$key]['package'] = $name[1];
} else if ($ext == '.src.rpm') {
$pkgs[$key]['status']['src'] = 1;
- } else if ($ext == '.youri') {
- $pkgs[$key]['status']['youri'] = 1;
+ } else if ($ext == '.upload') {
+ $pkgs[$key]['status']['upload'] = 1;
} else if ($ext == '.lock') {
preg_match("!.*\.iurt\.(.*)\.\d+\.\d+!", $data, $buildhost);
if ($pkgs[$key]['status']['build'])
@@ -208,7 +204,6 @@ $stats = array(
'building' => 0,
'partial' => 0,
'built' => 0,
- 'youri' => 0,
);
$total = count($pkgs);
@@ -279,7 +274,6 @@ header(sprintf('X-BS-Buildtime-Average: %5.2f', $buildtime_avg));
tr.building { background: #ffff99; }
tr.partial { background: #bbbbff; }
tr.built { background: #cceeff; }
- tr.youri { background: #aacc66; }
td.status-box { width: 1em; height: 1em; }
tr.uploaded td.status-box { background: green; }
@@ -288,7 +282,6 @@ header(sprintf('X-BS-Buildtime-Average: %5.2f', $buildtime_avg));
tr.building td.status-box { background: yellow; }
tr.partial td.status-box { background: blue; }
tr.built td.status-box { background: #00ccff; }
- tr.youri td.status-box { background: olive; }
#stats { float: right; }
#score { margin-bottom: 2em; font-family: Helvetica, Verdana, Arial, sans-serif; }