[Dehs-devel] r71 - in trunk: . tpls www
atomo64-guest at alioth.debian.org
atomo64-guest at alioth.debian.org
Thu Dec 13 01:07:00 UTC 2007
Author: atomo64-guest
Date: 2007-12-13 01:07:00 +0000 (Thu, 13 Dec 2007)
New Revision: 71
Added:
trunk/tpls/
trunk/tpls/new_version.mail.tpl
trunk/www/stats.html
Modified:
trunk/dehs_pg.php
trunk/www/maintainer.php
trunk/www/menu.inc
trunk/www/no_updated.php
trunk/www/no_upstream.php
trunk/www/no_watch.php
trunk/www/wwiz_detail.php
Log:
dehs_pg.php: fixed a two-levels break which caused the watch wizard to stop
tpls/: Added missing template files for the new version notifier
www/stats.html: Added statistics page, thanks to Lucas Nussbaum for the graphics
www/:*.php|inc: updated pages links
Modified: trunk/dehs_pg.php
===================================================================
--- trunk/dehs_pg.php 2007-12-12 01:23:48 UTC (rev 70)
+++ trunk/dehs_pg.php 2007-12-13 01:07:00 UTC (rev 71)
@@ -648,10 +648,6 @@
global $dirs,$dbconn,$sfIgnore,$watchFileExts,$watchFormat;
$db = pg_pconnect($dbconn) or die_status ("Db error");
$checked=$errors=$notfound=$verok=$notmatch=0;
- $sqlstring="SELECT mpop_inst,name,pkgs.version,pkgs.section,pkgs.dist,tot_up_error, tot_avg_error_date, wwiz_version FROM pkgs INNER JOIN
- (Select max(pop_inst) as mpop_inst,SUM(up_error) as tot_up_error,AVG(avg_error_date) as tot_avg_error_date,name,dist FROM binpkgs GROUP BY name,dist HAVING max(pop_inst) IS NOT NULL) as binpkgs using(name,dist)
- WHERE (watch IS NULL OR watch='') AND name LIKE '$src_name%' ORDER BY mpop_inst DESC";
- $rsql=pg_exec($db, $sqlstring);
// prepare some stuff that needs to be done once per run
$opts = '';
@@ -669,6 +665,11 @@
$opts = 'opts=uversionmangle=s/\.' . $exts . '$// \\';
}
+ $sqlstring="SELECT mpop_inst,name,pkgs.version,pkgs.section,pkgs.dist,tot_up_error, tot_avg_error_date, wwiz_version FROM pkgs INNER JOIN
+ (Select max(pop_inst) as mpop_inst,SUM(up_error) as tot_up_error,AVG(avg_error_date) as tot_avg_error_date,name,dist FROM binpkgs GROUP BY name,dist HAVING max(pop_inst) IS NOT NULL) as binpkgs using(name,dist)
+ WHERE (watch IS NULL OR watch='') AND name LIKE '$src_name%' ORDER BY mpop_inst DESC";
+ $rsql=pg_exec($db, $sqlstring);
+
while ($res_array=pg_fetch_array($rsql)) {
if (substr($res_array["name"],0,3)=='lib')
@@ -760,7 +761,7 @@
$uscan_res=uscan_foo($res_array['name'] ,$res_array['version'],$watch);
if ($uscan_res[0]) {
- break 2;
+ break;
}
}
@@ -826,7 +827,7 @@
//"<dversion>$res_array[version]</dversion>" .
//"<dversionmangled>$res_array[versionmangled]</dversionmangled>" .
"<wwiz>$wwiz</wwiz>" .
- //"<updated>" . ($res_array['updated']=='f')? 'true': 'false' . "</updated>" .
+ //"<updated>" . ($res_array['updated']=='t')? 'true': 'false' . "</updated>" .
"</data>";
$value=addslashes($xml);
dba_replace($res_array[name],$xml,$id);
Added: trunk/tpls/new_version.mail.tpl
===================================================================
--- trunk/tpls/new_version.mail.tpl (rev 0)
+++ trunk/tpls/new_version.mail.tpl 2007-12-13 01:07:00 UTC (rev 71)
@@ -0,0 +1,19 @@
+Subject: #PACKAGE#: New upstream version available
+To: #PACKAGE#_newversion at packages.qa.debian.org
+Hello,
+
+The Debian External Health System (a.k.a. DEHS) has found a new upstream version
+ of your package #PACKAGE# in the #DISTRO# distribution.
+The current package version is #DVERSION# and latest by upstream is #UVERSION#.
+
+If you are the maintainer or a co-maintainer of the package
+ please consider updating the package.
+
+If you believe this message can be improved in any way don't hesitate to contact me
+ by replying to this message.
+Note that the latest version by upstream is found thanks to the debian/watch file
+ provided by your package, in case this message is a false positive please review
+ the watch file before reporting.
+
+Sincerely,
+Raphael Geissert
\ No newline at end of file
Modified: trunk/www/maintainer.php
===================================================================
--- trunk/www/maintainer.php 2007-12-12 01:23:48 UTC (rev 70)
+++ trunk/www/maintainer.php 2007-12-13 01:07:00 UTC (rev 71)
@@ -35,7 +35,7 @@
</head>
<body>
<div style="text-align: center;">
-<h1>Debian External Health Status</h1>
+<h1><a href="http://dehs.alioth.debian.org/" style="color:black">Debian External Health Status</a></h1>
<?=$title?><br>
</div>
<?php
@@ -156,7 +156,7 @@
}
}
pg_close($db);
-
+
function changelog($res_array) {
if (substr($res_array["name"],0,3)=='lib') $initial=substr($res_array["name"],0,4);
else $initial=substr($res_array["name"],0,1);
Modified: trunk/www/menu.inc
===================================================================
--- trunk/www/menu.inc 2007-12-12 01:23:48 UTC (rev 70)
+++ trunk/www/menu.inc 2007-12-13 01:07:00 UTC (rev 71)
@@ -3,4 +3,5 @@
<a href="no_upstream.html">Pkgs with Watch file but no upstream version
checkable</a><br>
<a href="no_updated.html">Pkgs not in sync with Upstream Author version</a><br>
+<a href="stats.html">DEHS statistics</a><br>
</div><br>
Modified: trunk/www/no_updated.php
===================================================================
--- trunk/www/no_updated.php 2007-12-12 01:23:48 UTC (rev 70)
+++ trunk/www/no_updated.php 2007-12-13 01:07:00 UTC (rev 71)
@@ -26,7 +26,7 @@
</head>
<body>
<div style="text-align: center;">
-<h1>Debian External Health Status</h1>
+<h1><a href="http://dehs.alioth.debian.org/" style="color:black">Debian External Health Status</a></h1>
Most popular packages that are not in sync with Upstream author version<br>
<?include("menu.inc");?>
<?
Modified: trunk/www/no_upstream.php
===================================================================
--- trunk/www/no_upstream.php 2007-12-12 01:23:48 UTC (rev 70)
+++ trunk/www/no_upstream.php 2007-12-13 01:07:00 UTC (rev 71)
@@ -7,7 +7,7 @@
</head>
<body>
<div style="text-align: center;">
-<h1>Debian External Health Status</h1>
+<h1><a href="http://dehs.alioth.debian.org/" style="color:black">Debian External Health Status</a></h1>
Most popular sources packages that have watch file but Uscan can't retrive an upstream version<br>
Probably => An old Watch or bad filled Watch file in source package!
<?include("menu.inc");?>
@@ -17,7 +17,7 @@
$rsql2=pg_exec($db, "SELECT count(name) from pkgs WHERE watch is not null");
$totnowatch=pg_numrows($rsql);
$totpkgs=pg_fetch_array($rsql2);
-print "<b>Total Package without a checkable upstream</b>: $totnowatch
+print "<b>Total Package without a checkable upstream</b>: $totnowatch
<b>Total with Watch:</b> $totpkgs[0] <b>Share: </b> " . number_format ( $totnowatch/$totpkgs[0] * 100, 2, ",",".") . "%" ;
?>
@@ -39,7 +39,7 @@
<br>
</td>
</tr>
-<?
+<?
while ($res_array=pg_fetch_array($rsql)) {
?>
<tr>
@@ -56,10 +56,10 @@
<td style="vertical-align: top;"><? print htmlentities($res_array["watch_warn"]); ?><br>
</td>
</tr>
-<?
+<?
}
pg_close($db);
-?>
+?>
</tbody>
</table>
<br>
Modified: trunk/www/no_watch.php
===================================================================
--- trunk/www/no_watch.php 2007-12-12 01:23:48 UTC (rev 70)
+++ trunk/www/no_watch.php 2007-12-13 01:07:00 UTC (rev 71)
@@ -1,18 +1,18 @@
<?/*
-
+
Originally written by Stefano Fabri <bluefuture at nospam@email.it>
Copyright 2004, Stefano Fabri
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
@@ -26,12 +26,12 @@
</head>
<body>
<div style="text-align: center;">
-<h1>Debian External Health Status</h1>
+<h1><a href="http://dehs.alioth.debian.org/" style="color:black">Debian External Health Status</a></h1>
Source packages that need watch files - Sorted by popularity<br><br>
<?include("menu.inc");?>
<?
$sqlstring="SELECT id,mpop_inst,name,pkgs.version,pkgs.dist,tot_up_error, bytes, tot_avg_error_date,wwiz,wwiz_type,wwiz_version,up_changes FROM pkgs INNER JOIN
-(Select max(pop_inst) as mpop_inst,SUM(up_error) as tot_up_error,AVG(avg_error_date) as tot_avg_error_date,name,dist FROM binpkgs GROUP BY name,dist HAVING max(pop_inst) IS NOT NULL) as binpkgs using(name,dist)
+(Select max(pop_inst) as mpop_inst,SUM(up_error) as tot_up_error,AVG(avg_error_date) as tot_avg_error_date,name,dist FROM binpkgs GROUP BY name,dist HAVING max(pop_inst) IS NOT NULL) as binpkgs using(name,dist)
WHERE watch IS NULL OR watch='' ORDER BY mpop_inst DESC";
require "config_www.inc";
$rsql=pg_exec($db, $sqlstring);
@@ -124,7 +124,7 @@
$debian_vers = escapeshellarg(vers_conv($debian_vers));
passthru("dpkg --compare-versions $up_vers gt $debian_vers",$great);
if ($great==0) return 1;
-else return 0;
+else return 0;
}
function vers_conv($debvers) {
preg_match("/(.+:)?([^-]+)(ds|dfsg|debian)/",$debvers,$matches);
Added: trunk/www/stats.html
===================================================================
--- trunk/www/stats.html (rev 0)
+++ trunk/www/stats.html 2007-12-13 01:07:00 UTC (rev 71)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+<head>
+ <!--<link rel="stylesheet" href="http://www.debian.org/debian.css" type="text/css" />-->
+ <title>DEHS statistics</title>
+ <meta http-equiv="content-type" content="application/xhtml+xml; charset=iso-8859-1" />
+</head>
+<body>
+<div style="text-align: center;">
+<h1><a href="http://dehs.alioth.debian.org/" style="color:black">Debian External Health Status</a></h1>
+Overall DEHS statistics<br><br>
+ <div style="text-align: center;" class="navbar">
+<a href="no_watch.html" class="navbar">Pkgs without Watch file</a><br>
+<a href="no_upstream.html" class="navbar">Pkgs with Watch file but no upstream version
+checkable</a><br>
+<a href="no_updated.html" class="navbar">Pkgs not in sync with Upstream Author version</a><br>
+</div><br>
+ <table class="invisiblebox">
+ <tr>
+ <td colspan="2"><hr class="ruler" /></td>
+ </tr>
+ <tr>
+ <td><img src="/dehs-day.png" alt="daily graph" width="493" height="331"/></td>
+ <td><img src="/dehs-week.png" alt="weekly graph" width="493" height="331"/></td>
+ </tr>
+ <tr>
+ <td><img src="/dehs-month.png" alt="monthly graph" width="493" height="331"/></td>
+ <td><img src="/dehs-year.png" alt="yearly graph" width="493" height="331"/></td>
+ </tr>
+</table>
+</div>
+<div style="text-align:center"><span>Thanks to Lucas Nussbaum for the graphics</span><br/>
+<span>The data used to generate the graphics is available at <a href="/dehs_stats.txt">dehs_stats.txt</a></span></div>
+</body>
+</html>
\ No newline at end of file
Modified: trunk/www/wwiz_detail.php
===================================================================
--- trunk/www/wwiz_detail.php 2007-12-12 01:23:48 UTC (rev 70)
+++ trunk/www/wwiz_detail.php 2007-12-13 01:07:00 UTC (rev 71)
@@ -1,23 +1,22 @@
-<?/*
-
+<?php /*
+
Originally written by Stefano Fabri <bluefuture at nospam@email.it>
Copyright 2004, Stefano Fabri
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/?>
-<?
+*/
if (array_key_exists("id",$_GET) and is_numeric($_GET[id])) {
header("Content-Type: text/plain");
$db = @pg_connect("dbname=dehs") or die("Db error: Alioth postgres overloaded?");
@@ -34,9 +33,9 @@
if ($_GET[type]=="watch") {
if ($res_array[watch]) print $res_array[watch];
else print $res_array['wwiz'];
- }
- }
+ }
+ }
pg_close($db);
}
else print "Error in submitted id field";
-?>
+?>
\ No newline at end of file
More information about the Dehs-devel
mailing list