summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit21
1 files changed, 10 insertions, 11 deletions
diff --git a/dgit b/dgit
index 41a7fe2..25afa67 100755
--- a/dgit
+++ b/dgit
@@ -516,13 +516,15 @@ our %defcfg = ('dgit.default.distro' => 'debian',
'dgit.default.username' => '',
'dgit.default.archive-query-default-component' => 'main',
'dgit.default.ssh' => 'ssh',
+ 'dgit.default.archive-query' => 'madison:',
+ 'dgit.default.sshpsql-dbname' => 'service=projectb',
+ 'dgit-distro.debian.archive-query' => 'sshpsql:',
'dgit-distro.debian.git-host' => 'git.debian.org',
'dgit-distro.debian.git-proto' => 'git+ssh://',
'dgit-distro.debian.git-path' => '/git/dgit-repos/repos',
'dgit-distro.debian.git-check' => 'ssh-cmd',
'dgit-distro.debian.git-create' => 'ssh-cmd',
'dgit-distro.debian.sshpsql-host' => 'mirror.ftp-master.debian.org',
- 'dgit-distro.debian.sshpsql-dbname' => 'service=projectb',
'dgit-distro.debian.upload-host' => 'ftp-master', # for dput
'dgit-distro.debian.mirror' => 'http://ftp.debian.org/debian/',
'dgit-distro.debian.backports-quirk' => '(squeeze)-backports*',
@@ -728,16 +730,6 @@ our %rmad;
sub archive_query ($) {
my ($method) = @_;
my $query = access_cfg('archive-query','RETURN-UNDEF');
- if (!defined $query) {
- my $distro = access_basedistro();
- if ($distro eq 'debian') {
- $query = "sshpsql:".
- access_someuserhost('sshpsql').':'.
- access_cfg('sshpsql-dbname');
- } else {
- $query = "madison:$distro";
- }
- }
$query =~ s/^(\w+):// or badcfg "invalid archive-query method \`$query'";
my $proto = $1;
my $data = $'; #';
@@ -753,6 +745,9 @@ sub pool_dsc_subpath ($$) {
sub archive_query_madison ($$) {
my ($proto,$data) = @_;
die unless $proto eq 'madison';
+ if (!length $data) {
+ $data= access_cfg('madison-distro',access_basedistro());
+ }
$rmad{$package} ||= cmdoutput
qw(rmadison -asource),"-s$isuite","-u$data",$package;
my $rmad = $rmad{$package};
@@ -794,6 +789,10 @@ sub canonicalise_suite_madison ($$) {
sub sshpsql ($$) {
my ($data,$sql) = @_;
+ if (!length $data) {
+ $data= access_someuserhost('sshpsql').':'.
+ access_cfg('sshpsql-dbname');
+ }
$data =~ m/:/ or badcfg "invalid sshpsql method string \`$data'";
my ($userhost,$dbname) = ($`,$'); #';
my @rows;