/[qa]/trunk/wml/developer.wml
ViewVC logotype

Contents of /trunk/wml/developer.wml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 762 - (hide annotations) (download)
Tue May 11 10:00:36 2004 UTC (9 years ago) by igenibel
File size: 27842 byte(s)
Bug fix: reactivate correctly the comaint management
1 igenibel 358 #use wml::templ::template title="Debian Developer's Packages Overview" author="Igor Genibel"
2    
3 joy 365 # +-------------------------------------------------------------------------+
4     # | Copyright (C) 2002 Igor Genibel |
5     # | |
6     # | This program is free software; you can redistribute it and/or |
7     # | modify it under the terms of the GNU General Public License |
8     # | as published by the Free Software Foundation; either version 2 |
9     # | of the License, or (at your option) any later version. |
10     # | |
11     # | This program is distributed in the hope that it will be useful, |
12     # | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13     # | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14     # | GNU General Public License for more details. |
15     # +-------------------------------------------------------------------------+
16     # | This code is currently maintained and debugged by Igor Genibel, any |
17     # | questions or comments regarding this code should be directed to: |
18     # | - igor@genibel.org |
19     # +-------------------------------------------------------------------------+
20     # | - Igor Genibel - http://genibel.org/ |
21     # | $Id$
22     # +-------------------------------------------------------------------------+
23    
24 igenibel 617 <style type="text/css">
25     a.dash:link,a.dash:visited,a.dash:active {
26     text-decoration: none;
27     }
28     </style>
29    
30 igenibel 358 <?
31 igenibel 756 error_reporting(0);
32 igenibel 694 $time = microtime();
33 igenibel 358
34     $branch = array ("main",
35     "contrib",
36     "non-free",
37     "non-US/main",
38     "non-US/contrib",
39     "non-US/non-free" );
40    
41     setlocale(LC_ALL, 'fr_FR');
42 igenibel 697 setlocale(LC_TIME, 'C');
43     setlocale(LC_NUMERIC, 'C');
44 igenibel 358
45     $prefix="/org/qa.debian.org/data/ddpo/results";
46     #$prefix="/home/igenibel/qa.debian.org/data/ddpo/results";
47    
48 igenibel 634 function bug_display($bug_number, $base_url)
49 igenibel 615 {
50 igenibel 634 $bug_link="";
51 igenibel 615 preg_match("/(\d+)\((\d+)\)/", $bug_number, $result);
52     if (strcmp($result[1], $result[2]) == 0)
53     {
54 igenibel 634 $bug_link = "<a class=\"a\" href=\"$base_url\">$result[1]</a>";
55 igenibel 615 }else{
56 igenibel 634 $bug_link = "<a class=\"a\" href=\"${base_url}&amp;repeatmerged=no\">$result[1]</a>&nbsp;<a class=\"a\" href=\"${base_url}&amp;repeatmerged=yes\">($result[2])</a>";
57 igenibel 615 }
58 igenibel 634 return $bug_link;
59 igenibel 615 }
60    
61 igenibel 358 function printBackLink() {
62     ?>
63     <p><a href="developer.php">Back to main page</a></p>
64     <?
65     }
66    
67 igenibel 665 function print_header_entries_top($keys, $name, $comaint)
68 igenibel 358 {
69 igenibel 665 $add_comaint = "&comaint=$comaint";
70 igenibel 358 ?>
71 joy 366 <h1 align="center">Packages overview for <?print $name?></h1>
72 igenibel 358
73 joy 366 <p><strong>General information:</strong></p>
74 igenibel 358 <?
75     if ($keys == "NOID") {
76     ?>
77 joy 366 <p><font size="+1" color="red">GPG key id not found!</font>
78     <font size="-2">(key id was not found neither in the Debian keyring
79     nor on a public keyserver)</font></p>
80 igenibel 358 <?
81     }else{
82     foreach (explode(",", $keys) as $key) {
83     ?>
84 igenibel 665 <small>GPG key id: <a href="developer.php?gpg_key=<?print "$key". "$add_comaint"?>"><?print $key?></a></small><br>
85 igenibel 358 <?
86     }
87     }
88     }
89    
90     function print_header_entries_body($login, $key, $name)
91     {
92 igenibel 611 global $prefix;
93 igenibel 410 $lintian = preg_replace("/[\s-\"í'å]/", "_", $name);
94 igenibel 611 $fp = fopen("$prefix/../../ftp/Maintainers", "r");
95     $ok = 0;
96     while(!feof($fp)) {
97     $line = fgets($fp, "10240");
98     if (preg_match("/$login/", $line)) {
99     $ok = 1;
100 igenibel 695 $login = preg_replace('/\\\\/', '', $login);
101 igenibel 611 if (preg_match("/$login \(/", $line)) {
102     $buildd=urlencode("$login ($name) ");
103     }else{
104     $buildd=urlencode("$name <$login> ");
105     }
106     }
107     if ($ok == 1 ) {
108     break;
109     }
110     }
111     fclose($fp);
112 igenibel 358 ?>
113 joy 370 <small>
114 igenibel 695 <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=maint&amp;data=<? print urlencode($login) ?>&amp;archive=no&amp;raw=yes&amp;bug-rev=yes&amp;pend-exc=fixed&amp;pend-exc=done">Non-fixed bugs, most recent first</a><br>
115     <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?maint=<?print urlencode($login)?>">All bugs related to &lt;<?print $login?>&gt;</a><br>
116     <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?which=maint&amp;data=<?print urlencode($login)?>&amp;archive=no&amp;pend-exc=done&amp;sev-inc=critical&amp;sev-inc=grave&amp;sev-inc=serious">RC Bugs related to &lt;<?print $login?>&gt;</a><br>
117     <a href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?submitter=<?print urlencode($login)?>">All bugs submitted by &lt;<?print $login?>&gt;</a><br>
118 igenibel 358 <a href="http://lintian.debian.org/reports/m<?print $lintian?>.html">Lintian report</a><br>
119 joy 420 <a href="http://buildd.debian.org/bymaint.php?maint=<?print "$buildd"?>">Buildd report</a><br>
120 igenibel 695 <a href="http://www.debian.gr.jp/~kitame/maint.cgi?num=srcs&amp;limit=0&amp;showpkgs=on&amp;maint=<?print urlencode($login)?>">Bug statistics</a><br>
121 joy 370 </small>
122 igenibel 358
123     <hr>
124 joy 370 <small>
125 igenibel 610 <b>Packages in <font color="blue">blue</font> are packages that are co-maintained by developer (reference to Uploaders: field)</b><br>
126 joy 367 <b>Packages version in <font color="red">red</font> are NMUed</b><br>
127 igenibel 615 <b>Packages where testing version in <font color="#ff00ff">magenta</font> are those where the unstable version differs from the version in testing</b><br><br>
128 joy 637 <b><u>The real number of bugs is displayed in each bugs column.
129     If there are any merged bugs, the total is displayed within parenthesis.</u></b>
130 joy 370 </small>
131 igenibel 358 <?
132     }
133    
134     #
135     # print info for not found developer
136     #
137    
138     function print_notfound($login)
139     {
140     print "<h2>No information available for $login</h2>";
141     }
142    
143    
144     #
145     # print the form because no login provided
146     #
147    
148     function print_form()
149     {
150     ?>
151 joy 366
152     <h1>Debian Developer's Packages Overview</h1>
153    
154     <p>Use the following search forms to determine the Debian developer whose
155     packages overview you wish to see:</p>
156    
157 igenibel 665 <p>
158 igenibel 358 <form method="GET" action="developer.php">
159 igenibel 665 <label>Search based on the <tt>Maintainer</tt> field in packages:<br>
160     <input size="30" maxsize="40" type="text" limit="16" name="login" value=""></label><br>
161     <label>Display co-maintained packages:
162     <input type ="radio" name="comaint" value="yes" checked><strong>yes</strong>
163     <input type ="radio" name="comaint" value="no"><strong>no</strong>
164     <input type ="radio" name="comaint" value="only"><strong>only</strong></label><br>
165 joy 366 <input type="submit" value="Find">
166     </form>
167     <small>
168 joy 386 If a single username is provided, @debian.org is automatically appended.
169 joy 390 <br>
170     If you start with an uppercase letter or type two words, it is assumed that
171 joy 386 you want to do a (partial) match on the maintainer name.
172 joy 366 </small>
173 igenibel 665 </p><p>
174 igenibel 358 <form method="GET" action="developer.php">
175 igenibel 665 <label>Search based on a GPG key ID:<br>
176     <input size="8" maxsize="8" type="text" limit="8" name="gpg_key" value=""></label><br>
177     <label>Display co-maintained packages:
178     <input type ="radio" name="comaint" value="yes" checked><strong>yes</strong>
179     <input type ="radio" name="comaint" value="no"><strong>no</strong>
180     <input type ="radio" name="comaint" value="only"><strong>only</strong></label><br>
181 joy 366 <input type="submit" value="Find">
182     </form>
183 igenibel 665 </p><p>
184 igenibel 358 <form method="GET" action="developer.php">
185 igenibel 665 <label>Search based on a source package name:<br>
186     <input size="20" maxsize="30" type="text" limit="20" name="package" value=""></label> <br>
187     <label>Display co-maintained packages:
188     <input type ="radio" name="comaint" value="yes" checked><strong>yes</strong>
189     <input type ="radio" name="comaint" value="no"><strong>no</strong>
190     <input type ="radio" name="comaint" value="only"><strong>only</strong></label><br>
191 igenibel 358 <input type="submit" value="Go">
192     </form>
193 igenibel 665 </p>
194 igenibel 358 <?
195     }
196    
197    
198     function print_query_all()
199     {
200     ?>
201 joy 366
202     <p>Do you want to see the complete, sorted list of developers?
203     <strong>(>200kb!)</strong>
204 igenibel 358 <form method="POST" action="developer.php">
205     <input type="hidden" name="all" value="1">
206 joy 366 <input type="submit" value="Show the list">
207 igenibel 358 </form>
208    
209     <?
210     }
211    
212     function print_all()
213     {
214     global $prefix;
215     $fp = fopen("$prefix/extract", "r");
216     ?>
217    
218 joy 369 <hr>
219    
220     <h2>Sorted developer list</h2>
221    
222 igenibel 358 <table width="100%" border="1">
223     <tr align="center">
224     <td width="60%">
225     <b>Name and email</b>
226     </td>
227     <td>
228     <b>main</b>
229     </td>
230     <td>
231     <b>non-US</b>
232     </td>
233     <td>
234 cjwatson 596 <b>Other <font size="-3" color="blue"><br>all contrib &amp;<br>non-free<br>packages</font></b>
235 igenibel 358 </td>
236     <td>
237     <b>Total</b>
238     </td>
239     </tr>
240    
241     <?
242     while(!feof($fp)) {
243     $line = fgets($fp, "10240");
244     if($line != "") {
245     $count = 0;
246     $line = preg_replace("/, /", ",", $line);
247     preg_match("/;(.+?);(.+?);(.*?);(.*?);(.*?);(.*?);(.*?);(.*?);(.*)$/", $line, $info_array);
248     print '<tr align="center">';
249     print '<td width="15%">';
250     print "<b><a href=\"$index_page?login=$info_array[1]\">$info_array[3] &lt;$info_array[1]&gt;</a></b>";
251     print '</td>';
252     $main = 0;
253     $nonUS = 0;
254     $other = 0;
255     if($info_array[4] != "") {
256     $main += count(explode(" ", $info_array[4]));
257     $count += count(explode(" ", $info_array[4]));
258     }
259     if($info_array[5] != "") {
260     $other += count(explode(" ", $info_array[5]));
261     $count += count(explode(" ", $info_array[5]));
262     }
263     if($info_array[6] != "") {
264     $nonUS += count(explode(" ", $info_array[6]));
265     $count += count(explode(" ", $info_array[6]));
266     }
267     if($info_array[7] != "") {
268     $other += count(explode(" ", $info_array[7]));
269     $count += count(explode(" ", $info_array[7]));
270     }
271     if($info_array[8] != "") {
272     $other += count(explode(" ", $info_array[8]));
273     $count += count(explode(" ", $info_array[8]));
274     }
275     if($info_array[9] != "") {
276     $other += count(explode(" ", $info_array[9]));
277     $count += count(explode(" ", $info_array[9]));
278     }
279    
280     ?>
281     <td><? print $main?></td>
282     <td><? print $nonUS?></td>
283     <td><? print $other?></td>
284     <td><b><? print $count?></b></td>
285     </tr>
286     <?
287     }
288     }
289     print '</table>';
290     }
291    
292     function get_rep($package_name)
293     {
294     if(preg_match("/^lib/", $package_name)) {
295     return substr($package_name, 0, 4);
296     }else{
297     return substr($package_name, 0, 1);
298     }
299     }
300    
301 weasel 362 # Check whether there is a debcheck entry for that package
302     function debcheckavailable($branch, $package_name) {
303     $package = ereg_replace ("\.", "_", $package_name);
304     if (ereg ("[^a-zA-Z0-9+_-]", $package) ||
305     ($branch != "oldstable" && $branch != "stable" && $branch != "testing" && $branch != "unstable")) {
306     return 0;
307     }
308     $BASEDIR='/org/qa.debian.org/data/debcheck/result/';
309     return file_exists($BASEDIR.'/'.$branch.'/packages/'.$package);
310     }
311    
312 igenibel 358 #
313     # This function print a package table information for specific branch
314     # given in argument
315     #
316 igenibel 665 function print_package_entries($branch, $packages, $comaint)
317 igenibel 358 {
318    
319     $packages = preg_replace ("/, /", ",", $packages);
320     $pack_array = split(" ", $packages);
321 igenibel 665 $global_count = count($pack_array);
322 igenibel 762
323 igenibel 665 if ($comaint == "no") {
324     $result = 0;
325     for ($i = 0; $i < strlen($packages); $i++) {
326     if ($packages[$i] == '#') {
327     $result += 1;
328     }
329     }
330     $global_count -= $result;
331 igenibel 694 }elseif($comaint == "only") {
332 igenibel 665 $result = 0;
333     for ($i = 0; $i < strlen($packages); $i++) {
334     if ($packages[$i] == '#') {
335     $result += 1;
336     }
337     }
338     $global_count = $result;
339     }
340 igenibel 358
341     ?>
342 joy 369
343 igenibel 665 <h3>Packages in <em><?print $branch?></em> (<?print $global_count?>)</h3>
344 joy 369
345 joy 370 <table width="100%" border="1" cellpadding="3" cellspacing="1">
346 igenibel 358 <tr align="center">
347 joy 369 <th rowspan="2"><small><font color="green">Source&nbsp;Name</font></small></th>
348 igenibel 615 <th rowspan="1" colspan="5"><small><font color="green">Bugs(see above)</font></small></th>
349 igenibel 537 <th rowspan="1" colspan="5"><small><font color="green">Version</font></small></th>
350 joy 369 <th rowspan="1" colspan="2"><small><font color="green">Security</font></small></th>
351     <th rowspan="2"><small><font color="green">Binary<br> Package Page</font></small></th>
352     <th rowspan="2"><small><font color="green">Buildd</font></small></th>
353     <th rowspan="2"><small><font color="green">Excuses</font></small></th>
354 igenibel 640 <th rowspan="1" colspan="3"><small><font color="green">Problems</font></small></th>
355 joy 369 <th rowspan="2"><small><font color="green">Section</font></small></th>
356     <th rowspan="2"><small><font color="green">Priority</font></small></th>
357     <th rowspan="2"><small><font color="green">Pool</font></small></th>
358 igenibel 409 <th rowspan="1" colspan="3"><small><font color="green"><a href="http://www.debian.org/devel/testing">Uninstallable</a></font></small></th>
359 igenibel 358 </tr>
360     <tr align="center">
361 cjwatson 595 <th><small><u><font color="green"><span title="All opened bugs">All</span></font></u></small></th>
362     <th><small><u><font color="green"><span title="Release Critical bugs">RC</span></font></u></small></th>
363 cjwatson 596 <th><small><u><font color="green"><span title="Important &amp; Normal bugs">I&amp;N</span></font></u></small></th>
364     <th><small><u><font color="green"><span title="Minor &amp; Wishlist bugs">M&amp;W</span></font></u></small></th>
365     <th><small><u><font color="green"><span title="Fixed &amp; Pending bugs">F&amp;P</span></font></u></small></th>
366 joy 369 <th><small><font color="green">Stable</font></small></th>
367     <th><small><font color="green">Testing</font></small></th>
368     <th><small><font color="green">Unstable</font></small></th>
369 cjwatson 595 <th><small><u><font color="green"><span title="Stable Proposed updates">Prop. Up.</span></font></u></small></th>
370 joy 369 <th><small><font color="green">Exp.</font></small></th>
371     <th><small><font color="green">Stable</font></small></th>
372     <th><small><font color="green">Testing</font></small></th>
373     <th><small><font color="green">Stable</font></small></th>
374     <th><small><font color="green">Testing</font></small></th>
375     <th><small><font color="green">Unstable</font></small></th>
376     <th><small><font color="green">Stable</font></small></th>
377     <th><small><font color="green">Testing</font></small></th>
378     <th><small><font color="green">Unstable</font></small></th>
379 igenibel 358 </tr>
380     <?
381     foreach ($pack_array as $package)
382     {
383     global $prefix;
384 igenibel 665 $uploader=0;
385 igenibel 358 # print "<<< $package >>>";
386     # $upstream = $package[1];
387     preg_match("/(.+)\((.+)\)/", $package, $result);
388     $list = split (",", $result[2]);
389     $package_name = $result[1];
390     if(preg_match("/#/", $package)) {
391     $uploader = 1;
392     $package = preg_replace("/#/", "", $package);
393     }
394 igenibel 665 if ((($uploader == 1) && ( $comaint == "no")) ||
395     (($uploader == 0) && ( $comaint == "only"))) {
396     continue;
397     }
398 igenibel 358 if(preg_match("/%/", $package)) {
399     $all = 1;
400     $package = preg_replace("/%/", "", $package);
401     }
402 igenibel 550 preg_match("/(.+?)\[(.+)\]\{(.+)\}\{(.+)\}\{(.+)\}\|(.*)\|:(.*):/", $package, $results);
403 igenibel 358 $package = $package_name;
404     $version = $results[2];
405     $versions = explode (",", $version);
406     $version_stable = $versions[0];
407     $version_testing = $versions[1];
408     $version_unstable = $versions[2];
409 igenibel 537 $version_prop = $versions[3];
410     $version_experimental = $versions[4];
411     $security_stable = $versions[5];
412     $security_testing = $versions[6];
413 igenibel 358 $uninstalable_stable = preg_replace("/,/", "&nbsp;", $results[3]);
414     $uninstalable_testing = preg_replace("/,/", "&nbsp;", $results[4]);
415     $uninstalable_unstable = preg_replace("/,/", "&nbsp;", $results[5]);
416     $priority = $results[6];
417     $section = $results[7];
418    
419 igenibel 694 // make $bugsdb link persistent during this pagerequest, we don't lock, so
420     // this doesn't matter at all
421     static $bugsdb;
422     if (!$bugsdb) $bugsdb = dba_open("$prefix/bugs.db", 'r-', 'db2');
423    
424     if (!($bug_list = dba_fetch($package, $bugsdb))) {
425     $bug_list = '0(0) 0(0) 0(0) 0(0)';
426 igenibel 358 }
427 igenibel 694 $bug_list = explode(' ', $bug_list);
428 igenibel 358
429 weasel 362 if(strcmp($version_stable, "-") == 0 || !debcheckavailable('stable', $package)) {
430 joy 370 $stable_dep = "<small>-</small>";
431 igenibel 358 }else{
432 cjwatson 596 $stable_dep = '<small><a href="http://qa.debian.org/debcheck.php?dist=stable&amp;package=' . rawurlencode($package) .'">Stable</a></small>';
433 igenibel 358 }
434    
435 weasel 362 if(strcmp($version_testing, "-")== 0 || !debcheckavailable('testing', $package)) {
436 joy 370 $testing_dep = "<small>-</small>";
437 igenibel 358 }else{
438 cjwatson 596 $testing_dep = '<small><a href="http://qa.debian.org/debcheck.php?dist=testing&amp;package=' . rawurlencode($package) .'">Testing</a></small>';
439 igenibel 358 }
440    
441     $buildd = "http://buildd.debian.org/build.php?pkg=".$package;
442     if(preg_match("/non-US/", $branch)) {
443     $pool = "http://non-us.debian.org/debian-non-US/pool/". $branch . "/" .get_rep($package) . "/" . $package . "/";
444     }else{
445 joy 385 $pool = "http://ftp.debian.org/debian/pool/". $branch . "/" .get_rep($package) . "/" . $package . "/";
446 igenibel 358 }
447    
448 weasel 362 if(strcmp($version_unstable, "-")== 0 || !debcheckavailable('unstable', $package)) {
449 joy 370 $sid_dep = "<small>-</small>";
450 weasel 362 }else{
451 cjwatson 596 $sid_dep = '<small><a href="http://qa.debian.org/debcheck.php?dist=unstable&amp;package=' . rawurlencode($package) . '">Unstable</a></small>';
452 weasel 362 }
453 igenibel 358 $char = substr($package, 0, 1);
454     if(file_exists("$prefix/excuses/$char/$package")) {
455     $excuse = "<a href=\"developer.php?excuse=$package\">Excuses</a>";
456     }else{
457 igenibel 409 $excuse = "-";
458 igenibel 358 }
459 igenibel 537 if(strcmp($version_prop, "-")) {
460     $version_prop = '<font color="#2222AA"><b>' . $version_prop . '</b></font>';
461     }
462     $prop = '<td rowspan="1" colspan="1"><small>' . $version_prop . '</small></td>';
463 igenibel 358 if(strcmp($version_experimental, "-")) {
464     $version_experimental = '<font color="2222AA"><b>' . $version_experimental . '</b></font>';
465     }
466 joy 370 $experimental = '<td rowspan="1" colspan="1"><small>' . $version_experimental . '</small></td>';
467 igenibel 358
468    
469     if((strcmp ($version_stable, $version_testing) == 0) &&
470     (strcmp ($version_stable, "/") != 0)) {
471 igenibel 537 if((strcmp ($version_unstable, $version_testing) == 0)) {
472     $version_print = '<td rowspan="1" colspan="3"><small>' . $version_stable . '</small></td>' .$prop .$experimental;
473 igenibel 358 }else{
474 igenibel 598 $version_print = '<td rowspan="1" colspan="2"><small><font color="#ff00ff">' . $version_stable . '</font></small></td><td rowspan="1" colspan="1"><small>' . $version_unstable . '</small></td>' . $prop .$experimental;
475 igenibel 358 }
476     $ver = explode("-", $version_unstable);
477     if((preg_match("/(.+\..+?)$/", $ver[count($ver) - 1], $toto)) && (count($ver) != 1))
478     {
479     $version_print = preg_replace("/$version_unstable/", "<font color=\"red\">$version_unstable</font>", $version_print);
480     }
481     }else if(strcmp ($version_testing, $version_unstable) == 0) {
482     if(strcmp($version_stable, "/") != 0) {
483 igenibel 408 $version_stable = '<font color="#00AADD">'.$version_stable.'</font>';
484 igenibel 358 }
485 igenibel 537 $version_print = '<td><small>'.$version_stable.'</small></td><td rowspan="1" colspan="2"><small>' . $version_testing .'</small></td>' .$prop . $experimental;
486 igenibel 358 $ver = explode("-", $version_unstable);
487     if((preg_match("/(.+\..+?)$/", $ver[count($ver) - 1], $toto)) && (count($ver) != 1))
488     {
489     $version_print = preg_replace("/$version_unstable/", "<font color=\"red\">$version_unstable</font>", $version_print);
490     }
491     }else {
492     if(strcmp($version_stable, "/") != 0) {
493 joy 370 $version_stable = '<small><font color="#00AADD">'.$version_stable.'</font></small>';
494 igenibel 358 }else{
495 joy 370 $version_stable = '<small>'.$version_stable.'</small>';
496 igenibel 537 }
497     $version_print = '<td>' . $version_stable . '</td><td><small><font color="#ff00ff">'.$version_testing . '</font></small></td><td><small>'.$version_unstable.'</small></td>' . $prop .$experimental;
498 igenibel 358 $ver = explode("-", $version_unstable);
499     if((preg_match("/(.+\..+?)$/", $ver[count($ver) - 1], $toto)) && (count($ver) != 1))
500     {
501     $version_print = preg_replace("/$version_unstable/", "<font color=\"red\">$version_unstable</font>", $version_print);
502     }
503     }
504    
505 igenibel 694 if (@$background) {
506 igenibel 627 print '<tr align="center">';
507 igenibel 694 $background=false;
508 igenibel 627 }else{
509     print '<tr align="center" bgcolor="#dcdcdc">';
510 igenibel 694 $background=true;
511 igenibel 627 }
512 igenibel 358 ?>
513     <td width="15%">
514 joy 370 <small>
515 igenibel 358 <?
516 joy 370 if ($uploader == 1) {
517     print '<font color="blue">';
518     }
519 igenibel 392 print "<b>$package</b><a href=\"http://packages.qa.debian.org/".get_rep($package)."/$package.html\">[pts]</a>";
520 joy 370 if ($uploader == 1) {
521     print '</font>';
522 igenibel 358 $uploader = 0;
523     }
524 joy 370 ?>
525     </small>
526     </td>
527 igenibel 358 <td>
528 joy 370 <small>
529 igenibel 358 <?
530 igenibel 634 $bugs = "http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=". rawurlencode($package)."&amp;archive=no&amp;pend-exc=pending-fixed&amp;pend-exc=fixed&amp;pend-exc=done";
531     $nobugs = "http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=". rawurlencode($package)."&amp;archive=no";
532 igenibel 358 $bugs_all = "http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=". rawurlencode($package);
533     $bug_count = $bug_list[0] + $bug_list[1] + $bug_list[2] + $bug_list[3];
534 igenibel 615 $real_bug_count = 0;
535 igenibel 694 foreach ($bug_list as $bug_item) {
536     preg_match("/\d+\((\d+)\)/", $bug_item, $count_array);
537     $real_bug_count += $count_array[1];
538     }
539 igenibel 358 if($bug_count == 0) { ?>
540 igenibel 617 <a class="dash" href="<?print $bugs_all?>">-</a>
541 igenibel 634 <? }else{
542     print bug_display("$bug_count($real_bug_count)", $bugs_all);
543     } ?>
544 joy 370 </small>
545 igenibel 358 </td>
546     <td>
547 joy 370 <small>
548 igenibel 358 <?
549 igenibel 615 if(!strcmp($bug_list[0], "0(0)")) { ?>
550 igenibel 617 <a class="dash" href="<? print $nobugs; ?>&amp;sev-inc=critical&amp;sev-inc=grave&amp;sev-inc=serious">-</a>
551 igenibel 634 <? }else{ print bug_display($bug_list[0], "$bugs" . "&amp;sev-inc=critical&amp;sev-inc=grave&amp;sev-inc=serious"); } ?>
552 joy 370 </small>
553 igenibel 358 </td>
554     <td>
555 joy 370 <small>
556 igenibel 358 <?
557 igenibel 615 if(!strcmp($bug_list[1], "0(0)")) { ?>
558 igenibel 617 <a class="dash" href="<? print $nobugs; ?>&amp;sev-inc=important&amp;sev-inc=normal">-</a>
559 igenibel 634 <? }else{ print bug_display($bug_list[1], "$bugs" . "&amp;sev-inc=important&amp;sev-inc=normal"); } ?>
560 joy 370 </small>
561 igenibel 358 </td>
562     <td>
563 joy 370 <small>
564 igenibel 358 <?
565 igenibel 615 if(!strcmp($bug_list[2], "0(0)")) { ?>
566 igenibel 617 <a class="dash" href="<? print $nobugs; ?>&amp;sev-inc=minor&amp;sev-inc=wishlist">-</a>
567 igenibel 634 <? }else{ print bug_display($bug_list[2], "$bugs" . "&amp;sev-inc=minor&amp;sev-inc=wishlist"); } ?>
568 joy 370 </small>
569 igenibel 358 </td>
570     <td>
571 joy 370 <small>
572 igenibel 358 <?
573 igenibel 615 if(!strcmp($bug_list[3], "0(0)")) { ?>
574 igenibel 636 <a class="dash" href="http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=<? print rawurlencode($package); ?>&amp;archive=no&amp;pend-inc=pending-fixed&amp;pend-inc=fixed">-</a>
575 igenibel 635 <? }else{ print bug_display($bug_list[3], "http://bugs.debian.org/cgi-bin/pkgreport.cgi?src=". rawurlencode($package)."&amp;archive=no&amp;pend-inc=pending-fixed&amp;pend-inc=fixed"); } ?>
576 joy 370 </small>
577 igenibel 358 </td>
578     <?
579    
580     print $version_print;
581     if(strcmp($security_stable,"-")) {
582     $security_stable = "<font color=\"red\">$security_stable</font>";
583     }
584     if(strcmp($security_testing,"-")) {
585     $security_testing = "<font color=\"red\">$security_stable</font>";
586     }
587 joy 370 print '<td><small>'.$security_stable.'</small></td><td><small>'.$security_testing.'</small></td>';
588 igenibel 358 ?>
589     <td width="15%">
590 joy 370 <small>
591 igenibel 358 <?
592     for ($i = 1; $i <= count($list); $i++) {
593     $url = rawurlencode("${list[$i -1]}");
594 igenibel 627 print '<a title="';
595     print "${list[$i -1]}";
596     print '" href="http://packages.debian.org/';
597 igenibel 358 print $url;
598     print '">';
599     print $i;
600     print "</a>";
601     if(($i % 3 ) == 0) {
602     print " ";
603     }else{
604     print "&nbsp;";
605     }
606     }
607     ?>
608 joy 370 </small>
609 igenibel 358 </td>
610     <td>
611 joy 370 <small>
612 igenibel 537 <?
613 igenibel 694 if(@$all || preg_match("/non-free/", $branch) || (strcmp($version_unstable, "-") == 0)) {
614 igenibel 409 print "-";
615 igenibel 358 $all = 0;
616     }else{
617     print "<a href=\"$buildd\">Buildd</a>";
618     }
619     ?>
620 joy 370 </small>
621 igenibel 358 </td>
622     <td>
623 joy 370 <small>
624 igenibel 358 <?
625     print $excuse;
626     ?>
627 joy 370 </small>
628 igenibel 358 </td>
629     <td>
630     <?print $stable_dep?>
631     </td>
632     <td>
633     <?print $testing_dep?>
634     </td>
635     <td>
636     <?print $sid_dep?>
637     </td>
638     <td>
639     <?
640 joy 370 print "<small>$section</small>";
641 igenibel 358 ?>
642 joy 370 </td>
643 igenibel 358 <td>
644     <?
645 joy 370 print "<small>$priority</small>";
646 igenibel 358 ?>
647 joy 370 </td>
648 igenibel 358 <td>
649 joy 370 <small>
650 igenibel 358 <a href="<?print $pool?>">Pool</a>
651 joy 370 </small>
652 igenibel 358 </td>
653     <td>
654     <?
655 joy 370 print "<small>$uninstalable_stable</small>";
656 igenibel 358 ?>
657     </td>
658     <td>
659     <?
660 joy 370 print "<small>$uninstalable_testing</small>";
661 igenibel 358 ?>
662     </td>
663     <td>
664     <?
665 joy 370 print "<small>$uninstalable_unstable</small>";
666 igenibel 358 ?>
667     </td>
668     </tr>
669     <?
670     }
671     ?>
672     </table>
673     <?
674     }
675    
676 igenibel 762 if($comaint == "") {
677 igenibel 665 $comaint = "yes";
678     }
679 igenibel 694 if(@$excuse) {
680 igenibel 358 $char = substr($excuse, 0, 1);
681 igenibel 537 $excuse = preg_replace("/ /", "+", $excuse);
682 igenibel 358 if(file_exists("$prefix/excuses/$char/$excuse")) {
683     $fp = fopen("$prefix/excuses/$char/$excuse","r");
684     print fread ($fp, filesize ("$prefix/excuses/$char/$excuse"));
685     fclose($fp);
686     }else{
687     print "<h2>No excuse for $excuse</h2>";
688     }
689 igenibel 694 }else if(@$gpg_key) {
690 igenibel 358 $contents = file("$prefix/extract");
691    
692     $printed = 0;
693     $match = 0;
694    
695     $gpg_key = preg_replace ("/0x/i", "", $gpg_key);
696     foreach ($contents as $line) {
697     if(preg_match("/;(.+?);(.*$gpg_key.*);(.+?);(.*?);(.*?);(.*?);(.*?);(.*?);(.*)/i", $line, $pack_array)) {
698     $match += 1;
699     if($printed == 0) {
700 igenibel 665 print_header_entries_top($pack_array[2], $pack_array[3], $comaint);
701 igenibel 358 $printed = 1;
702     }else{
703     print "<hr>";
704     }
705    
706     print_header_entries_body($pack_array[1], $pack_array[2], $pack_array[3]);
707     $count = 4;
708     foreach ($branch as $value) {
709     if($pack_array[$count] != "") {
710 igenibel 665 print_package_entries($value, $pack_array[$count], $comaint);
711 igenibel 358 }
712     $count += 1;
713     }
714     }
715     }
716     if($match == 0) {
717     print_notfound($gpg_key);
718     }
719    
720     printBackLink();
721 igenibel 694 }else if(@$login) {
722 igenibel 695 $login = preg_replace ("/\+/", "\+", $login);
723 igenibel 358 $fp = fopen("$prefix/extract", "r");
724     $contents = fread($fp, filesize ("$prefix/extract"));
725 joy 386
726     if (preg_match("/\S \S/", $login) || preg_match("/^[A-Z][^@]+$/", $login)) {
727 joy 391 if (preg_match("/;(.*?);(.*?);(.*$login.*);(.*?);(.*?);(.*?);(.*?);(.*?);(.*)/", $contents, $pack_array)) {
728 igenibel 665 print_header_entries_top($pack_array[2], $pack_array[3], $comaint);
729 joy 386 print_header_entries_body($pack_array[1], $pack_array[2], $pack_array[3]);
730 joy 389 $count = 4;
731 joy 386 foreach ($branch as $value) {
732     if($pack_array[$count] != "") {
733 igenibel 665 print_package_entries($value, $pack_array[$count], $comaint);
734 joy 386 }
735     $count += 1;
736 joy 387 }
737 joy 386 } else {
738     print_notfound($login);
739     }
740     } else {
741 joy 388 if (! preg_match("/@/", $login)) {
742 joy 386 $login .= "@debian.org";
743     }
744     if (preg_match("/;$login;(.*?);(.*?);(.*?);(.*?);(.*?);(.*?);(.*?);(.*)/i", $contents, $pack_array)) {
745 igenibel 665 print_header_entries_top($pack_array[1], $pack_array[2], $comaint);
746 igenibel 358 print_header_entries_body($login, $pack_array[1], $pack_array[2]);
747     $count = 3;
748     foreach ($branch as $value) {
749     if($pack_array[$count] != "") {
750 igenibel 665 print_package_entries($value, $pack_array[$count], $comaint);
751 igenibel 358 }
752     $count += 1;
753     }
754 joy 386 } else {
755 igenibel 358 print_notfound($login);
756     }
757 joy 386 }
758 igenibel 358 fclose($fp);
759     printBackLink();
760 igenibel 694 }else if (@$package) {
761 igenibel 358 $fp = fopen("$prefix/extract", "r");
762     $found = 0;
763     if(preg_match("/\+\+/", $package)) {
764     $package_short = preg_replace("/\+/", "", $package);
765     $regexp="/[ ;]$package_short..\(/";
766 igenibel 665 $regexp2="[ ;]$package_short..\(";
767 igenibel 358 }elseif(preg_match("/\+/", $package)){
768     $package_short = preg_replace("/\+/", "", $package);
769     $regexp="/[ ;]$package_short.\(/";
770 igenibel 665 $regexp2="[ ;]$package_short.\(";
771 igenibel 358 }else{
772     $regexp="/[ ;]$package\(/";
773 igenibel 665 $regexp2="[ ;]$package\(";
774 igenibel 358 }
775     while(!feof($fp)) {
776 igenibel 548 $line = fgets($fp, "32768");
777 igenibel 358 if(preg_match("$regexp", $line, $results)) {
778     $found = 1;
779     preg_match("/;(.+?);(.*?);(.*?);(.*?);(.*?);(.*?);(.*?);(.*?);(.*)/i", $line, $pack_array);
780 igenibel 665 preg_match("/$regexp2(?:.+?\)\[)(?:\S+?):(?:.+?):(.+?) /i", $line, $result);
781     if(($comaint == "no") && ( preg_match("/\#/", $result[1]))) {
782     continue;
783     }
784    
785     print_header_entries_top($pack_array[2], $pack_array[3], $comaint);
786 igenibel 358 print_header_entries_body($pack_array[1], $pack_array[2], $pack_array[3]);
787     $count = 4;
788     foreach ($branch as $value) {
789     if($pack_array[$count] != "") {
790 igenibel 665 print_package_entries($value, $pack_array[$count], $comaint);
791 igenibel 358 }
792     $count += 1;
793     }
794     }
795     }
796     if($found == 0) {
797     print_notfound($package);
798     }
799     fclose($fp);
800     printBackLink();
801     }else{
802     print_form();
803 igenibel 694 if(@$all) {
804 igenibel 358 print_all();
805     }else{
806     print_query_all();
807     }
808     }
809    
810     $fp = fopen("$prefix/extract.date", "r");
811     $general = fgets($fp, "512");
812     fclose($fp);
813     $fp = fopen("$prefix/bugs.date", "r");
814     $bugs = fgets($fp, "512");
815     fclose($fp);
816     ?>
817 joy 384
818 joy 368 <hr>
819 joy 384
820 joy 368 <p><small>
821 igenibel 358 Last updated:<br>
822 joy 368 General information: <? print $general; ?><br>
823 joy 384 Bug information: <? print $bugs; ?><br>
824     General information is updated once a day.<br>
825 igenibel 694 Bug information is updated every 15 minutes.<br>
826     <?
827     list($micro,$sec) = explode(' ', microtime());
828     list($smicro,$ssec) = explode(' ', $time);
829     echo "Time needed to generate page: ".($sec-$ssec+$micro-$smicro)."s";
830     ?>
831 joy 368 </small></p>

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5