summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2012-02-20 23:06:24 +0000
committerPascal Terjan <pterjan@mageia.org>2012-02-20 23:06:24 +0000
commit4a2d4ab0999b888141e67e54786b51552517600f (patch)
tree5e541409275908fe5ff24a0ccb32503c60847f21 /index.php
parentda8f6a38aeb2f8037c29a4bf18a137eb1a0d9320 (diff)
downloadpkgsubmit-4a2d4ab0999b888141e67e54786b51552517600f.tar
pkgsubmit-4a2d4ab0999b888141e67e54786b51552517600f.tar.gz
pkgsubmit-4a2d4ab0999b888141e67e54786b51552517600f.tar.bz2
pkgsubmit-4a2d4ab0999b888141e67e54786b51552517600f.tar.xz
pkgsubmit-4a2d4ab0999b888141e67e54786b51552517600f.zip
Use youri-check results to count the number of broken dependencies
Diffstat (limited to 'index.php')
-rw-r--r--index.php25
1 files changed, 10 insertions, 15 deletions
diff --git a/index.php b/index.php
index cb753c2..b7a1f69 100644
--- a/index.php
+++ b/index.php
@@ -113,12 +113,6 @@ if ($g_user) {
$tz = new DateTimeZone('UTC');
$date_gen = date('c');
-# Temporary until initial mirror is ready
-chdir("data");
-$missing_deps = file("missing-deps.i586.txt");
-#########################################
-$unmaintained = file('unmaintained.txt');
-
chdir($upload_dir);
$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\"");
@@ -327,15 +321,16 @@ if (!is_null($g_user) || $_GET['package'])
if (!$_GET['package']) {
-# Temporary until initial mirror is ready
-echo sprintf(
- '<p><a href="%s">%s broken dependencies</a>. <a href="%s">%s unmaintained packages</a>. <strong><a href="%s">You can help!</a></strong></p>',
- 'data/missing-deps.i586.txt', count($missing_deps) == 0 ? 'no' : count($missing_deps),
- 'data/unmaintained.txt', count($unmaintained),
- 'https://wiki.mageia.org/en/Importing_packages'
-);
-
-#########################################
+$missing_deps_count = preg_match_all("/<item>/m", strtr(file_get_contents("http://check.mageia.org/cauldron/dependencies.rss"), "\n", " "), $matches);
+$unmaintained_count = count(file(__DIR__ . '/data/unmaintained.txt'));
+if ($missing_deps_count > 0 || $unmaintained_count > 0) {
+ echo "<p>";
+ if ($missing_deps_count > 0)
+ echo "<a href=\"http://check.mageia.org/cauldron/dependencies.html\">$missing_deps_count broken dependencies</a>. ";
+ if ($unmaintained_count > 0)
+ echo "<a href=\"data/unmaintained.txt\">$unmaintained_count unmaintained packages</a>. ";
+ echo '<a href="https://wiki.mageia.org/en/Importing_packages">You can help!</a></strong></p>';
+}
if ($upload_time) {
echo sprintf('<p>Upload in progress for %s.</p>', timediff($upload_time));