Package: devscripts
Version: 2.10.48
Severity: wishlist
Tags: patch

Here's a patch allowing to store RMADISON_DEFAULT_URL in one of the
devscripts config files and have it used by rmadison.  My ~/.devscripts
now contains "RMADISON_DEFAULT_URL=debian,bpo" and this makes my life
easier.  Patch made against svn://svn.debian.org/devscripts/trunk r1856.

Index: debian/changelog
===================================================================
--- debian/changelog	(révision 1856)
+++ debian/changelog	(copie de travail)
@@ -1,3 +1,11 @@
+devscripts (2.10.48+lolando) unstable; urgency=low
+
+  * rmadison: Read a new RMADISON_DEFAULT_URL configuration variable
+    allowing to store the default URL (or list of URLs) to use.  (Closes:
+    #XXXXXX (bug number pending)).
+
+ -- Roland Mas <lola...@debian.org>  Wed, 15 Apr 2009 14:19:26 +0200
+
 devscripts (2.10.48) unstable; urgency=low
 
   [ Adam D. Barratt ]
Index: scripts/rmadison.pl
===================================================================
--- scripts/rmadison.pl	(révision 1856)
+++ scripts/rmadison.pl	(copie de travail)
@@ -75,6 +75,7 @@
     'debug' => "http://debug.debian.net/cgi-bin/madison.cgi";,
     'ubuntu' => "http://people.ubuntu.com/~ubuntu-archive/madison.cgi";,
 );
+my $default_url = "debian";
 
 if (@ARGV and $ARGV[0] =~ /^--no-?conf$/) {
     shift;
@@ -96,8 +97,11 @@
     @config_vars = split /\n/, $shell_out, -1;
 
    foreach my $envvar (@config_vars) {
-	$envvar =~ /^RMADISON_URL_MAP_([^=]*)=(.*)$/ or next;
-	$url_map{lc($1)}=$2;
+	if ($envvar =~ /^RMADISON_URL_MAP_([^=]*)=(.*)$/) {
+	    $url_map{lc($1)}=$2;
+	} elsif ($envvar =~ /^RMADISON_DEFAULT_URL=(.*)$/) {
+	    $default_url=$1;
+	}
     }
 }
 
@@ -161,7 +165,7 @@
 push @args, "S" if $params->{'source-and-binary'};
 push @args, "t" if $params->{'time'};
 
-my $url = $params->{'url'} ? $params->{'url'} : "debian";
+my $url = $params->{'url'} ? $params->{'url'} : $default_url;
 my @url = split /,/, $url;
 
 foreach my $url (@url) {
@@ -276,6 +280,10 @@
 Multiple shorthand entries may be specified by using multiple
 B<RMADISON_URL_MAP_*> variables.
 
+=item B<RMADISON_DEFAULT_URL>=I<URL>
+
+Set the default URL to use unless overridden by a command line option.
+
 =back
 
 =head1 NOTES
I also suggest adding "debian" as the default value in the shipped
devscripts.conf so the Ubuntu guys could avoid patching the script and
only differ in the config file.  Or adding some machinery to guess the
proper default value to use, so they wouldn't even need to patch.

-- Package-specific info:

--- /etc/devscripts.conf ---

--- ~/.devscripts ---
DEBRELEASE_UPLOADER=dput
DEBUILD_DPKG_BUILDPACKAGE_OPTS=-i
. /home/roland/.config/deb-packaging
DEBRELEASE_DEBS_DIR=$BUILDRESULT
RMADISON_DEFAULT_URL=debian,bpo

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.29-1-686 (SMP w/1 CPU core)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages devscripts depends on:
ii  dpkg-dev                      1.14.26    Debian package development tools
ii  libc6                         2.9-7      GNU C Library: Shared libraries
ii  perl                          5.10.0-19  Larry Wall's Practical Extraction 

Versions of packages devscripts recommends:
ii  at                 3.1.10.2              Delayed job execution and batch pr
ii  bsd-mailx [mailx]  8.1.2-0.20081101cvs-2 A simple mail user agent
ii  bzr                1.14~rc1-2            easy to use distributed version co
ii  curl               7.18.2-8.1            Get a file from an HTTP, HTTPS or 
ii  cvs                1:1.12.13-12          Concurrent Versions System
ii  dctrl-tools        2.13.1                Command-line tools to process Debi
ii  debian-keyring     2009.04.04            GnuPG (and obsolete PGP) keys of D
ii  debian-maintainers 1.55                  GPG keys of Debian maintainers
ii  dput               0.9.4                 Debian package upload tool
ii  dupload            2.6.6                 utility to upload Debian packages
ii  epiphany-gecko [ww 2.24.3-2              Intuitive GNOME web browser - Geck
ii  equivs             2.0.7-0.1             Circumvent Debian package dependen
ii  fakeroot           1.12.2                Gives a fake root environment
ii  git-core           1:1.6.2.2-1           fast, scalable, distributed revisi
ii  gnupg              1.4.9-4               GNU privacy guard - a free PGP rep
ii  iceweasel [www-bro 3.0.7-1               lightweight web browser based on M
ii  libauthen-sasl-per 2.12-1                Authen::SASL - SASL Authentication
ii  libcrypt-ssleay-pe 0.57-1+b1             Support for https protocol in LWP
ii  libparse-debcontro 2.005-2               Easy OO parsing of Debian control-
ii  libsoap-lite-perl  0.710.08-2            Client and server side SOAP implem
ii  libterm-size-perl  0.2-4+b1              Perl extension for retrieving term
ii  libtimedate-perl   1.1600-9              Time and date functions for Perl
ii  liburi-perl        1.37+dfsg-1           Manipulates and accesses URI strin
ii  libwww-perl        5.825-1               WWW client/server library for Perl
ii  libyaml-syck-perl  1.05-1                Fast, lightweight YAML loader and 
ii  lintian            2.2.9                 Debian package checker
ii  lsb-release        3.2-22                Linux Standard Base version report
ii  lynx-cur [www-brow 2.8.7pre1-1           Text-mode WWW Browser with NLS sup
ii  mailx              1:20081101-2          Transitional package for mailx ren
ii  man-db             2.5.5-1               on-line manual pager
ii  openssh-client [ss 1:5.1p1-5             secure shell client, an rlogin/rsh
ii  patch              2.5.9-5               Apply a diff file to an original
ii  patchutils         0.3.1-1               Utilities to work with patches
ii  strace             4.5.18-1              A system call tracer
ii  subversion         1.5.6dfsg-1           Advanced version control system
ii  tla                1.3.5+dfsg-14         GNU Arch revision control system
ii  unzip              5.52-12               De-archiver for .zip files
ii  w3m [www-browser]  0.5.2-2+b1            WWW browsable pager with excellent
ii  wdiff              0.5-18                Compares two files word by word
ii  wget               1.11.4-2              retrieves files from the web

Versions of packages devscripts suggests:
ii  build-essential               11.4       Informational list of build-essent
ii  cvs-buildpackage              5.23       A set of Debian package scripts fo
ii  devscripts-el                 29.5-1     Emacs wrappers for the commands in
pn  gnuplot                       <none>     (no description available)
pn  libfile-desktopentry-perl     <none>     (no description available)
pn  libnet-smtp-ssl-perl          <none>     (no description available)
ii  mutt                          1.5.18-6   text-based mailreader supporting M
pn  svn-buildpackage              <none>     (no description available)

-- no debconf information

Reply via email to