SVN devscripts commit: r517 - in trunk: . debian
Christoph Berg
myon at alioth.debian.org
Wed Feb 21 13:23:34 CET 2007
Author: myon
Date: 2007-02-21 13:23:34 +0100 (Wed, 21 Feb 2007)
New Revision: 517
Modified:
trunk/debian/changelog
trunk/debian/control
trunk/rmadison.pl
Log:
* Also joining the team.
* rmadison: new upstream version, supports querying other archives
(specifically backports.org).
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-02-20 20:22:49 UTC (rev 516)
+++ trunk/debian/changelog 2007-02-21 12:23:34 UTC (rev 517)
@@ -11,8 +11,13 @@
* Allow to use debdiff with no argument (Closes: #369691)
+ Patch from Julien Danjou.
- -- Julian Gilbey <jdg at debian.org> Tue, 20 Feb 2007 20:22:24 +0000
+ [ Christoph Berg ]
+ * Also joining the team.
+ * rmadison: new upstream version, supports querying other archives
+ (specifically backports.org).
+ -- Christoph Berg <myon at debian.org> Wed, 21 Feb 2007 13:19:25 +0100
+
devscripts (2.9.27) unstable; urgency=low
* checkbashisms: check for 'select' (thanks to James Abley, Ubuntu user)
Modified: trunk/debian/control
===================================================================
--- trunk/debian/control 2007-02-20 20:22:49 UTC (rev 516)
+++ trunk/debian/control 2007-02-21 12:23:34 UTC (rev 517)
@@ -2,7 +2,7 @@
Section: devel
Priority: optional
Maintainer: Devscripts Devel Team <devscripts-devel at lists.alioth.debian.org>
-Uploaders: Julian Gilbey <jdg at debian.org>, Filippo Giunchedi <filippo at debian.org>, Joey Hess <joeyh at debian.org>, Mohammed Adnène Trojette <adn+deb at diwi.org>
+Uploaders: Julian Gilbey <jdg at debian.org>, Filippo Giunchedi <filippo at debian.org>, Joey Hess <joeyh at debian.org>, Mohammed Adnène Trojette <adn+deb at diwi.org>, Christoph Berg <myon at debian.org>
Standards-Version: 3.7.2
Build-Depends: perl (>= 5.8), debhelper (>= 4.0.0), libtimedate-perl, libwww-perl, xsltproc, docbook-xsl, po4a (>= 0.26)
XS-Vcs-Svn: svn://svn.debian.org/devscripts/trunk
Modified: trunk/rmadison.pl
===================================================================
--- trunk/rmadison.pl 2007-02-20 20:22:49 UTC (rev 516)
+++ trunk/rmadison.pl 2007-02-21 12:23:34 UTC (rev 517)
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
# vim:sw=4:sta:
-# Copyright (C) 2006 Christoph Berg <myon at debian.org>
+# Copyright (C) 2006, 2007 Christoph Berg <myon at debian.org>
#
# 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
@@ -20,11 +20,11 @@
use strict;
use Getopt::Long;
-my $VERSION = '0.1';
+my $VERSION = '0.2';
sub version($) {
my ($fd) = @_;
- print $fd "rmadison $VERSION (C) 2006 Christoph Berg <myon\@debian.org>\n";
+ print $fd "rmadison $VERSION (C) 2006, 2007 Christoph Berg <myon\@debian.org>\n";
}
sub usage($$) {
@@ -41,6 +41,7 @@
-h, --help show this help and exit
-s, --suite=SUITE only show info for this suite
-S, --source-and-binary show info for the binary children of source pkgs
+ -u, --url=URL use URL instead of http://qa.debian.org/madison.php
ARCH, COMPONENT and SUITE can be comma (or space) separated lists, e.g.
--architecture=m68k,i386
@@ -69,6 +70,8 @@
'--suite=s' => \$params->{'suite'},
'-S' => \$params->{'source-and-binary'},
'--source-and-binary' => \$params->{'source-and-binary'},
+ '-u=s' => \$params->{'url'},
+ '--url=s' => \$params->{'url'},
'--version' => \$params->{'version'},
)) {
usage(\*STDERR, 1);
@@ -104,10 +107,17 @@
push @args, "s=$params->{'suite'}" if $params->{'suite'};
push @args, "S" if $params->{'source-and-binary'};
-my @cmd = -x "/usr/bin/curl" ? qw/curl -s/ : qw/wget -q -O -/;
-system @cmd, "http://qa.debian.org/madison.php?package=" .
- join("+", map { s/\+/%2B/g; $_ } @ARGV) . "&text=on&" . join ("&", @args);
+my $url = $params->{'url'} ? $params->{'url'} : "qa";
+my %url_map = (
+ 'qa' => "http://qa.debian.org/madison.php",
+ 'myon' => "http://qa.debian.org/~myon/madison.php",
+ 'bpo' => "http://www.backports.org/cgi-bin/madison.cgi",
+);
+$url = $url_map{$url} if $url_map{$url};
+my @cmd = -x "/usr/bin/curl" ? qw/curl -s -S/ : qw/wget -q -O -/;
+system @cmd, $url . "?package=" . join("+", @ARGV) . "&text=on&" . join ("&", @args);
+
=pod
=head1 NAME
@@ -118,13 +128,13 @@
=over
-=item B<rmadison> [I<options>] I<package> ...
+=item B<rmadison> [I<OPTIONS>] I<PACKAGE> ...
=back
=head1 DESCRIPTION
-The B<madison> tool queries the Debian archive database ("projectb") and
+B<dak ls> queries the Debian archive database ("projectb") and
displays which package version is registered per architecture/component/suite.
The CGI at B<http://qa.debian.org/madison.php> provides that service without
requiring ssh access to ftp-master.debian.org or the mirror on
@@ -135,15 +145,15 @@
=over
-=item B<-a>, B<--architecture=ARCH>
+=item B<-a>, B<--architecture=>I<ARCH>
only show info for ARCH(s)
-=item B<-b>, B<--binary-type=TYPE>
+=item B<-b>, B<--binary-type=>I<TYPE>
only show info for binary TYPE
-=item B<-c>, B<--component=COMPONENT>
+=item B<-c>, B<--component=>I<COMPONENT>
only show info for COMPONENT(s)
@@ -159,19 +169,20 @@
show this help and exit
-=item B<-r>, B<--regex>
+=item B<-s>, B<--suite=>I<SUITE>
-treat PACKAGE as a regex. Since that can easily DoS the database ("-r ."), this
-option is not supported by the CGI and rmadison.
-
-=item B<-s>, B<--suite=SUITE>
-
only show info for this suite
=item B<-S>, B<--source-and-binary>
show info for the binary children of source pkgs
+=item B<-u>, B<--url=>I<URL>
+
+use I<URL> for the query. Supported shorthands are
+ B<qa> http://qa.debian.org/madison.php (the default)
+ B<bpo> http://www.backports.org/cgi-bin/madison.cgi
+
=item B<--version>
show version and exit
@@ -181,14 +192,26 @@
ARCH, COMPONENT and SUITE can be comma (or space) separated lists, e.g.
--architecture=m68k,i386
+=head1 NOTES
+
+B<dak ls> also supports B<-r>, B<--regex> to treat I<PACKAGE> as a regex. Since
+that can easily DoS the database ("-r ."), this option is not supported by the
+CGI and rmadison.
+
+B<dak ls> was formerly called B<madison>.
+
+The protocol used by rmadison is fairly simple, the CGI accepts query the
+parameters a, b, c, g, G, s, S, and package. The parameter text is passed to
+enable plain-text output.
+
=head1 SEE ALSO
-madison-lite(1), madison(1).
+madison-lite(1), dak(1).
=head1 AUTHOR
rmadison and http://qa.debian.org/madison.php were written by Christoph Berg
-<myon at debian.org>. madison itself is part of dak, written by
+<myon at debian.org>. dak was written by
James Troup <james at nocrew.org>, Anthony Towns <ajt at debian.org>, and others.
=cut
More information about the Devscripts-devel
mailing list