]> git.pld-linux.org Git - projects/buildlogs.git/commitdiff
- oh well.. don't want to cache qa? it will be fetch each time
authorMichal Moskal <michal@moskal.me>
Sat, 11 May 2002 13:51:18 +0000 (13:51 +0000)
committerMichal Moskal <michal@moskal.me>
Sat, 11 May 2002 13:51:18 +0000 (13:51 +0000)
obsolete/buildlogs/index.php

index ca7afddc6fff44cd660e170bf77a0e975b788f25..62f0886b329da01f43e159d6a5ecc09dc122f853 100644 (file)
@@ -1,6 +1,5 @@
 <?php
 $buildlogs_server = "buildlogs.pld.org.pl";
-$rpmqa_path = ".";
 $url = "index.php";
 $addr = array(
        "/nest/i386",
@@ -14,6 +13,19 @@ $addr = array(
        "/ra/sparc",
        "/ra/ppc"
 );
+$qa_base = "http://ftp.pld.org.pl/.stat/builder";
+$qa_addr = array(
+       "/kenny/rpmqa-nest-i386.txt",
+       "/kenny/rpmqa-nest-i586.txt",
+       "/kenny/rpmqa-nest-i686.txt",
+       "",
+       "/ep/rpmqa-ra-i386.txt",
+       "/ep/rpmqa-ra-i586.txt",
+       "/ep/rpmqa-ra-i686.txt",
+       "",
+       "",
+       ""
+);
 $local = 1; /* $local=0 for FTP */ 
 $root_directory = "/home/services/ftp/pub/logs";
 /* It should be set */
@@ -751,16 +763,13 @@ function list_archs()
 
 function dump_qa($plain)
 {
-       global $url, $idx, $addr, $rpmqa_path;
+       global $url, $idx, $qa_addr, $qa_base;
        
-       if (!isset($idx) || !isset($addr[$idx]))
+       if (!isset($idx) || !isset($qa_addr[$idx]))
                return false;
 
-       $a = $addr[$idx];
-       $a = preg_replace("|^/|", "", $a);
-       $a = preg_replace("|/|", "-", $a);
-       echo ;
-
+       $a = $qa_addr[$idx];
+       
        if ($plain) {
                header("Content-type: text/plain"); 
                echo "# rpm -qa of $a\n";
@@ -771,9 +780,16 @@ function dump_qa($plain)
                start_pre();
        }
 
-       $f = fopen("$rpmqa_path/$a.txt", "r");
-       while (($s = fgets($f, 1000)) != false) {
-               echo $s;
+       if ($qa_addr[$idx] == "") {
+               echo "Sorry... not found.";
+       } else {
+               $f = fopen("$qa_base$qa_addr[$idx]", "r");
+               if ($f == 0) {
+                       echo "Sorry, cannot open $qa_base$qa_addr[$idx]";
+               } else
+                       while (($s = fgets($f, 1000)) != false) {
+                               echo $s;
+                       }
        }
        
        if (!$plain)
@@ -790,7 +806,7 @@ Feel free to email bug reports, complaints and feature requests
 <!-- ech... niech strace... -->
 <a href="mailto:malekith (at) pld org pl">to us</a>. Positive opinions are also 
 <a href="mailto:malekith (at) pld org pl">welcome</a> ;)</p>
-<p>Version: $Id: index.php,v 1.6 2002/04/22 11:13:42 malekith Exp $</p>
+<p>Version: $Id: index.php,v 1.7 2002/05/04 19:23:30 kloczek Exp $</p>
 </td><td width=20%>&nbsp;</td></tr>
 </table>
 <?php
This page took 0.097836 seconds and 4 git commands to generate.