The following commit has been merged in the master branch:
commit 9e0387554e9396e3d0e325bca3067177fead7851
Author: James Vega <[email protected]>
Date: Thu Jan 27 22:09:23 2011 -0500
rmadison: New configuration variable: RMADISON_ARCHITECTURE.
Sets the default architecture to use unless overridden by a command line
option. --architecture='*' can be used to run an unrestricted query when
RMADISON_ARCHITECTURE is set.
Thanks to Uli Martens.
Signed-off-by: James Vega <[email protected]>
diff --git a/conf.default.in b/conf.default.in
index de8644c..3e290c1 100644
--- a/conf.default.in
+++ b/conf.default.in
@@ -535,6 +535,11 @@
#
# Default URL to use if none is specified on the command line.
# RMADISON_DEFAULT_URL=debian
+#
+# Default architecture to use if none is specified on the command line.
+# use --architecture='*' to run an unrestricted query when
+# RMADISON_ARCHITECTURE is set.
+# RMADISON_ARCHITECTURE=source,i386,amd64,all
##### svnpath
#
diff --git a/debian/changelog b/debian/changelog
index 06f3f16..c1b14c6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -25,6 +25,10 @@ devscripts (2.10.70) UNRELEASED; urgency=low
package, unpack it, and move the missing files over. Add a new option
--source (DEBCHECKOUT_SOURCE) to control this behavior. (Closes: #535767)
* Makefiles: Fix parallelization for use with make -j N.
+ * rmadison: New configuration variable: RMADISON_ARCHITECTURE.
+ Set the default architecture to use unless overridden by a command line
+ option. To see any packages with a set B<RMADISON_ARCHITECTURE>, use
+ --architecture='*'. By Uli Martens.
-- James Vega <[email protected]> Thu, 02 Dec 2010 20:27:34 -0500
diff --git a/debian/postinst b/debian/postinst
index d5a682f..c6d3882 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -700,6 +700,12 @@ EOF
# (never auto download-only always)
# DEBCHECKOUT_SOURCE=auto
+#### rmadison option added in 2.10.70
+#
+# Default architecture to use if none is specified on the command line.
+# use --architecture='*' to override RMADISON_ARCHITECTURE
+# RMADISON_ARCHITECTURE=source,i386,amd64,all
+
EOF
fi
fi
diff --git a/scripts/rmadison.pl b/scripts/rmadison.pl
index 505d446..3d4724b 100755
--- a/scripts/rmadison.pl
+++ b/scripts/rmadison.pl
@@ -1,7 +1,8 @@
#!/usr/bin/perl -w
# vim:sw=4:sta:
-# Copyright (C) 2006, 2007, 2008 Christoph Berg <[email protected]>
+# Copyright (C) 2006-2010 Christoph Berg <[email protected]>
+# (C) 2010 Uli Martens <[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
@@ -34,11 +35,15 @@ BEGIN {
import URI::Escape;
}
-my $VERSION = '0.3';
+my $VERSION = '0.4';
sub version($) {
my ($fd) = @_;
- print $fd "rmadison $VERSION (devscripts ###VERSION###) (C) 2006, 2007
Christoph Berg <myon\@debian.org>\n";
+ print $fd <<EOT;
+rmadison $VERSION (devscripts ###VERSION###)
+(C) 2006-2010 Christoph Berg <myon\@debian.org>
+(C) 2010 Uli Martens <uli\@youam.net>
+EOT
}
sub usage($$) {
@@ -77,6 +82,7 @@ my %url_map = (
'udd' => 'http://qa.debian.org/cgi-bin/madison.cgi',
);
my $default_url = "debian";
+my $default_arch;
if (@ARGV and $ARGV[0] =~ /^--no-?conf$/) {
shift;
@@ -102,6 +108,8 @@ if (@ARGV and $ARGV[0] =~ /^--no-?conf$/) {
$url_map{lc($1)}=$2;
} elsif ($envvar =~ /^RMADISON_DEFAULT_URL=(.*)$/) {
$default_url=$1;
+ } elsif ($envvar =~ /^RMADISON_ARCHITECTURE=(.*)$/) {
+ $default_arch=$1;
}
}
}
@@ -157,7 +165,12 @@ if ($params->{greaterorequal} and $params->{greaterthan}) {
}
my @args;
-push @args, "a=$params->{'architecture'}" if $params->{'architecture'};
+
+if ( $params->{'architecture'} ) {
+ push @args, "a=$params->{'architecture'}";
+} elsif ( $default_arch ) {
+ push @args, "a=$default_arch";
+}
push @args, "b=$params->{'binary-type'}" if $params->{'binary-type'};
push @args, "c=$params->{'component'}" if $params->{'component'};
push @args, "g" if $params->{'greaterorequal'};
@@ -285,6 +298,12 @@ B<RMADISON_URL_MAP_*> variables.
Set the default URL to use unless overridden by a command line option.
+=item B<RMADISON_ARCHITECTURE>=I<ARCH>
+
+Set the default architecture to use unless overridden by a command line option.
+To run an unrestricted query when B<RMADISON_ARCHITECTURE> is set, use
+B<--architecture='*'>.
+
=back
=head1 NOTES
--
Git repository for devscripts
--
To unsubscribe, send mail to [email protected].