diff options
-rw-r--r-- | debian/changelog | 3 | ||||
-rwxr-xr-x | dgit | 21 |
2 files changed, 13 insertions, 11 deletions
diff --git a/debian/changelog b/debian/changelog index a00153e..96f829a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,9 @@ dgit (0.23~) unstable; urgency=low * Replace many calls to stat with new wrapper stat_exists; improves error handling and simplifies the code. + * Distro access configuration handling changes (should not be noticeable + to most users). + -- dgit (0.22.1) unstable; urgency=high @@ -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; |