The following commit has been merged in the master branch:
commit 3435ce7649a63463dd0cb49e35c75fbc1ec9f946
Author: Christoph Berg <[email protected]>
Date: Tue Oct 19 09:35:31 2010 +0200
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=any. By
Uli Martens.
diff --git a/conf.default.in b/conf.default.in
index 1bc74ce..05e29af 100644
--- a/conf.default.in
+++ b/conf.default.in
@@ -530,6 +530,10 @@
#
# 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=any to see any...
+# RMADISON_ARCHITECTURE=source,i386,amd64,all
##### svnpath
#
diff --git a/debian/changelog b/debian/changelog
index a1a2ea2..3728c6b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,12 @@ devscripts (2.10.69) UNRELEASED; urgency=low
what should be written inside of source files.
(Closes: #502512)
+ [ Christoph Berg ]
+ * 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=any. By Uli Martens.
+
-- Martin Zobel-Helas <[email protected]> Wed, 13 Oct 2010 02:01:57 +0200
devscripts (2.10.68) unstable; urgency=low
diff --git a/debian/postinst b/debian/postinst
index 0227377..e9895b7 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -689,6 +689,19 @@ EOF
EOF
fi
+
+ if dpkg --compare-versions "$2" lt 2.10.69
+ then
+ cat >> /etc/devscripts.conf << EOF
+#### rmadison option added in 2.10.69
+#
+# Default architecture to use if none is specified on the command line.
+# use --architecture=any to see any...
+# RMADISON_ARCHITECTURE=source,i386,amd64,all
+
+EOF
+ fi
+
fi
fi
diff --git a/scripts/rmadison.pl b/scripts/rmadison.pl
index 505d446..615525d 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 <[email protected]>\n";
+ print $fd <<EOT;
+rmadison $VERSION (devscripts ###VERSION###)
+(C) 2006-2010 Christoph Berg <[email protected]>
+(C) 2010 Uli Martens <[email protected]>
+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'}" if $params->{'architecture'} ne
"any";
+} 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,10 @@ 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 see any packages with a set B<RMADISON_ARCHITECTURE>, use
--architecture=any.
+
=back
=head1 NOTES
--
Git repository for devscripts
--
To unsubscribe, send mail to [email protected].