Author: frankie Date: 2007-06-27 09:38:23 +0000 (Wed, 27 Jun 2007) New Revision: 926
Modified: scripts/dgis-status.pl Log: - Updated to check against stable/testing/unstable only. - Added non-free - Changed color semantics Modified: scripts/dgis-status.pl =================================================================== --- scripts/dgis-status.pl 2007-06-24 10:27:22 UTC (rev 925) +++ scripts/dgis-status.pl 2007-06-27 09:38:23 UTC (rev 926) @@ -4,7 +4,7 @@ # # $Id$ # -# Copyright 2005-2006 (C) Francesco P. Lovergine <[EMAIL PROTECTED]> +# Copyright 2005-2007 (C) Francesco P. Lovergine <[EMAIL PROTECTED]> # # 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 @@ -42,10 +42,9 @@ my %wget = ( 'quiet' => 'wget --passive-ftp --quiet -O ','verbose' => 'wget --passive-ftp -O ' ); my %gunzip = ( 'quiet' => 'gunzip --force --quiet ', 'verbose' => 'gunzip --force' ); my %paths = ( - 'dgis-stable' => ["http://pkg-grass.alioth.debian.org/debian-gis/dists/stable/main/source/","http://pkg-grass.alioth.debian.org/debian-gis/dists/stable/contrib/source/"], - 'dgis-unstable' => ["http://pkg-grass.alioth.debian.org/debian-gis/dists/unstable/main/source/","http://pkg-grass.alioth.debian.org/debian-gis/dists/unstable/contrib/source/"], - 'stable' => ["http://merkel.debian.org/debian/dists/stable/main/source/","http://merkel.debian.org/debian/dists/stable/contrib/source/"], - 'unstable' => ["http://merkel.debian.org/debian/dists/unstable/main/source/","http://merkel.debian.org/debian/dists/unstable/contrib/source/"], + 'stable' => ["http://merkel.debian.org/debian/dists/stable/main/source/","http://merkel.debian.org/debian/dists/stable/non-free/source/","http://merkel.debian.org/debian/dists/stable/contrib/source/"], + 'testing' => ["http://merkel.debian.org/debian/dists/stable/main/source/","http://merkel.debian.org/debian/dists/stable/non-free/source/","http://merkel.debian.org/debian/dists/stable/contrib/source/"], + 'unstable' => ["http://merkel.debian.org/debian/dists/unstable/main/source/","http://merkel.debian.org/debian/dists/unstable/non-free/source/","http://merkel.debian.org/debian/dists/unstable/contrib/source/"], ); my $sources = "Sources"; @@ -166,9 +165,8 @@ <tr class='title'> <TH />Package <TH />Stable +<TH />Testing <TH />Unstable -<TH />DebianGis stable -<TH />DebianGis unstable </tr> EOF @@ -197,32 +195,26 @@ if ( $dgishash{$p}->{unstable} ne " " && $dgishash{$p}->{stable} eq " " ) { $tr_class = "class='green'"; } - if ( $dgishash{$p}->{unstable} eq " " && $dgishash{$p}->{stable} eq " " && - $dgishash{$p}->{'dgis-unstable'} eq " " && $dgishash{$p}->{'dgis-stable'} ) { + if ( $dgishash{$p}->{unstable} eq " " && $dgishash{$p}->{stable} eq " " ) { $tr_class = "class='yellow'"; } if ( $dgishash{$p}->{unstable} ne " " && $dgishash{$p}->{stable} ne " " && $vs->compare($dgishash{$p}->{unstable},$dgishash{$p}->{stable}) > 0 ) { - $tr_class = "class='green'"; + $tr_class = "class='orange'"; } - if ( $dgishash{$p}->{unstable} ne " " && $dgishash{$p}->{'dgis-unstable'} ne " " && - $vs->compare($dgishash{$p}->{unstable},$dgishash{$p}->{'dgis-unstable'}) > 0 ) { - $tr_class = "class='othered'"; + if ( $dgishash{$p}->{unstable} ne " " && $dgishash{$p}->{testing} ne " " && + $vs->compare($dgishash{$p}->{unstable},$dgishash{$p}->{testing}) > 0 ) { + $tr_class = "class='red'"; } - if ( $dgishash{$p}->{unstable} ne " " && $dgishash{$p}->{'dgis-unstable'} ne " " && - $vs->compare($dgishash{$p}->{unstable},$dgishash{$p}->{'dgis-unstable'}) < 0 ) { + if ( $dgishash{$p}->{unstable} ne " " && $dgishash{$p}->{testing} eq " " ) { $tr_class = "class='red'"; } - if ( $dgishash{$p}->{unstable} eq " " && $dgishash{$p}->{'dgis-unstable'} ne " " ) { - $tr_class = "class='orange'"; - } print <<EOF; <tr $tr_class> <td >$p_url</td> <td >$dgishash{$p}->{stable}</td> -<td >$dgishash{$p}->{unstable}</td> -<td >$dgishash{$p}->{'dgis-stable'}</td> -<td >$dgishash{$p}->{'dgis-unstable'}</td> +<td >$dgishash{$p}->{testing}</td> +<td >$dgishash{$p}->{unstable}</td> </tr> EOF } @@ -236,29 +228,30 @@ <td valign=top> <table border=0> <caption><h3>Color legend</h3></caption> + <tr> <td> <table class='pkg'> -<tr class='orange'> +<tr class='green'> <td> </td> </tr> </table> </td> <td> -<small>Available in DebianGis, not yet in sid</small> +<small>Same version in unstable/testing/stable</small> </td> </tr> <tr> <td> <table class='pkg'> -<tr class='green'> +<tr class='orange'> <td> </td> </tr> </table> </td> <td> -<small>Available in Sid, not in stable</small> +<small>Obsolete or not in stable</small> </td> </tr> @@ -284,33 +277,20 @@ </table> </td> <td> -<small>New in DebianGis, obsolete in sid</small> +<small>Obsolete or not in testing</small> </td> </tr> -<tr> -<td> -<table class='pkg'> -<tr class='othered'> -<td> </td> -</tr> -</table> </td> -<td> -<small>Obsolete in DebianGis, up-to-date in sid</small> -</td> </tr> - -</td> -</tr> </table> </table> <p />Status at: $now - <br />Total of Stable/Unstable/DebianGisStable/DebianGisUnstable packages: $tot_pkgs{stable}/$tot_pkgs{unstable}/$tot_pkgs{'dgis-stable'}/$tot_pkgs{'dgis-unstable'} + <br />Total of Stable/Testing/Unstable packages: $tot_pkgs{stable}/$tot_pkgs{testing}/$tot_pkgs{unstable} <p /><small>Generated by <a href="http://svn.debian.org/wsvn/pkg-grass/scripts/dgis-status.pl?op=file&rev=0&sc=0">this GPL licensed perl script</a> written by: <a href="mailto:[EMAIL PROTECTED]">Francesco P. Lovergine</a> for DebianGis use.</small> <p /> - <p /><em>Go to <a href="http://pkg-grass.alioth.debian.org/">DebianGis Wiki</a></em> + <p /><em>Go to <a href="http://wiki.debian.org/DebianGis">DebianGis Wiki</a></em> </body> </htmL> _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel