Discussion:
svn: /pear/pearweb/trunk/ package-qa.xml public_html/qa/index.php public_html/qa/packages_orphan_patches.php
Daniel O'Connor
2011-04-26 06:03:28 UTC
Permalink
clockwerx Tue, 26 Apr 2011 06:03:28 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=310495

Log:
Added orphan packages/patches list

Changed paths:
U pear/pearweb/trunk/package-qa.xml
U pear/pearweb/trunk/public_html/qa/index.php
A pear/pearweb/trunk/public_html/qa/packages_orphan_patches.php

Modified: pear/pearweb/trunk/package-qa.xml
===================================================================
--- pear/pearweb/trunk/package-qa.xml 2011-04-26 05:33:58 UTC (rev 310494)
+++ pear/pearweb/trunk/package-qa.xml 2011-04-26 06:03:28 UTC (rev 310495)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<package packagerversion="1.9.0RC4" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
+<package packagerversion="1.9.1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>pearweb_qa</name>
<channel>pear.php.net</channel>
<summary>The source code for the PEAR website QA scripts</summary>
@@ -22,8 +22,8 @@
<email>***@php.net</email>
<active>yes</active>
</developer>
- <date>2009-09-07</date>
- <time>21:18:14</time>
+ <date>2011-04-26</date>
+ <time>15:00:56</time>
<version>
<release>1.0.1</release>
<api>0.1.0</api>
@@ -43,6 +43,7 @@
<dir name="qa">
<file name="packages_closed_reports_no_release.php" role="www" />
<file name="packages_orphan.php" role="www" />
+ <file name="packages_orphan_patches.php" role="www" />
<file name="packages_status.php" role="www" />
<file name="packages_status_detail.php" role="www" />
<file name="patches_on_open_reports.php" role="www" />
@@ -96,7 +97,7 @@
<release>stable</release>
<api>stable</api>
</stability>
- <date>2009-09-07</date>
+ <date>2011-04-26</date>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- text/javascript for all &lt;script&gt; [clockwerx]

Modified: pear/pearweb/trunk/public_html/qa/index.php
===================================================================
--- pear/pearweb/trunk/public_html/qa/index.php 2011-04-26 05:33:58 UTC (rev 310494)
+++ pear/pearweb/trunk/public_html/qa/index.php 2011-04-26 06:03:28 UTC (rev 310495)
@@ -57,7 +57,8 @@
<li><a href="/qa/packages_closed_reports_no_release.php">List of packages that have closed reports but no release within certain amount of time</a></li>
<li><a href="/qa/patches_on_open_reports.php">List of packages with patches attached to them</a></li>
<li><a href="/qa/packages_orphan.php">List of orphan packages</a></li>
- <li><a href="http://pear.cweiske.de/">PEAR's QA test suite</a></li>
+ <li><a href="/qa/packages_orphan_patches.php">Orphan packages with patches</a></li>
+
</ul>
EOD;
echo $str;

Added: pear/pearweb/trunk/public_html/qa/packages_orphan_patches.php
===================================================================
--- pear/pearweb/trunk/public_html/qa/packages_orphan_patches.php (rev 0)
+++ pear/pearweb/trunk/public_html/qa/packages_orphan_patches.php 2011-04-26 06:03:28 UTC (rev 310495)
@@ -0,0 +1,90 @@
+<?php
+/*
+ +----------------------------------------------------------------------+
+ | PEAR Web site version 1.0 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 2001-2008 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 3.01 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/3_01.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | ***@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: Helgi Þormar Þorbjörnsson <***@php.net> |
+ +----------------------------------------------------------------------+
+ $Id: patches_on_open_reports.php 281637 2009-06-04 08:51:45Z clockwerx $
+*/
+
+include_once 'HTML/Table.php';
+
+// Sortable tables http://www.kryogenix.org/code/browser/sorttable/
+$extra_header = '<script type="text/javascript" src="/javascript/sorttable.js"></script>';
+
+response_header('Quality Assurance Initiative - Orphan Packages with Patches',
+ false, $extra_header);
+
+$sql = "
+SELECT
+ packages.package_type,
+ packages.name,
+ bugdb.ts2,
+ bugdb.id AS bug_id
+FROM
+ packages
+ JOIN bugdb ON packages.name = bugdb.package_name AND bugdb.status IN ('Open', 'Assigned', 'Analyzed', 'Critical', 'Verified')
+ JOIN bugdb_patchtracker ON bugdb.id = bugdb_patchtracker.bugdb_id
+WHERE
+ unmaintained = 1 AND package_type = 'pear' AND approved = 1
+ AND
+ (packages.newchannel IS NULL OR packages.newchannel = '')
+ AND
+ (packages.newpackagename IS NULL OR packages.newpackagename = '')
+GROUP BY
+ packages.id, packages.name, bugdb.package_name, bugdb.id
+ORDER BY
+ packages.name";
+
+$res = $dbh->getAll($sql, null, DB_FETCHMODE_ASSOC);
+$total_rows = $dbh->getOne('SELECT FOUND_ROWS()');
+
+echo '<h1>Orphan packages with patches</h1>';
+echo 'Found ' . $total_rows . ' reports with patches attached<br /><br />';
+
+$bugs = array('pear' => array());
+foreach ($res as $data) {
+ $bugs[$data['package_type']][$data['name']]['bug_id'][] = $data['bug_id'];
+}
+
+// PEAR
+$table = new HTML_Table(array('class' => 'sortable'));
+$table->setHeaderContents(0, 0, 'Package');
+$table->setHeaderContents(0, 1, '# bugs');
+
+
+$row = 1;
+foreach ($bugs['pear'] as $name => $qa) {
+ $table->addRow(array(
+ make_link('/package/' . $name . '/', $name),
+ make_link('#package_bugs_' . $name, count($qa['bug_id'])),
+ ));
+ $table->setCellAttributes($row, 1, 'style="text-align: center;"');
+ $row++;
+}
+
+echo '<h2 id="pear">PEAR (' . count($bugs['pear']) . ')</h2>';
+echo $table->toHTML();
+
+echo '<h2>Details</h2>';
+foreach ($bugs['pear'] as $name => $qa) {
+ echo '<h3 id="package_bugs_' . $name . '">' . $name . '</h3>';
+ echo '<ul>';
+ foreach ($qa['bug_id'] as $bug_id) {
+ echo '<li>' . make_link('/bugs/' . $bug_id, $bug_id) . '</li>';
+ }
+ echo '</ul>';
+}
+
+response_footer();

Loading...