our %defcfg = ('dgit.default.distro' => 'debian',
'dgit.default.username' => '',
+ 'dgit.default.archive-query-default-component' => 'main',
'dgit.default.ssh' => 'ssh',
'dgit-distro.debian.git-host' => 'git.debian.org',
'dgit-distro.debian.git-proto' => 'git+ssh://',
my $url = $'; #';
die unless $proto eq 'madison';
$rmad ||= cmdoutput qw(rmadison -asource),"-s$suite","-u$url",$package;
- $rmad =~ m/^ \s*( [^ \t|]+ )\s* \|
+ $rmad =~ m{^ \s*( [^ \t|]+ )\s* \|
\s*( [^ \t|]+ )\s* \|
- \s*( [^ \t|]+ )\s* \|
- \s*( [^ \t|]+ )\s* /x or die "$rmad $?";
+ \s*( [^ \t|/]+ )(?:/([^ \t|/]+)) \s* \|
+ \s*( [^ \t|]+ )\s* }x or die "$rmad $?";
$1 eq $package or die "$rmad $package ?";
my $vsn = $2;
if ($suite ne $3) {
print "canonical suite name for $suite is $3\n";
$suite = $3;
}
- $4 eq 'source' or die "$rmad ?";
+ my $component;
+ if (defined $4) {
+ $component = $4;
+ } else {
+ $component = access_cfg('archive-query-default-component');
+ }
+ $5 eq 'source' or die "$rmad ?";
my $prefix = substr($package, 0, $package =~ m/^l/ ? 4 : 1);
- my $subpath = "/pool/main/$prefix/$package/${package}_$vsn.dsc";
+ my $subpath = "/pool/$component/$prefix/$package/${package}_$vsn.dsc";
return ($vsn,$subpath);
}
.TP
.BI dgit-distro. distro .archive-query
.TP
+.BI dgit-distro. distro .archive-query-default-component
+.TP
.BI dgit-distro. distro .ssh
.TP
.BR dgit.default. *
for each
.BR dgit-distro. \fIdistro\fR . *
.SH BUGS
-dgit will only work with packages in main. The madison http query API
-does not give the component.
-
-dgit assumes knowledge of the archive layout. There appears to be no
-sane way to find the path in the archive pool of the .dsc for a
-particular suite.
-
We should be using some kind of vhost/vpath setup for the git repos on
alioth, so that they can be moved later if and when this turns out to
be a good idea.
The option parser requires values to be cuddled to the option name.
+dgit assumes knowledge of the archive layout. There appears to be no
+sane way to find the path in the archive pool of the .dsc for a
+particular suite. I'm assured that the archive layout is a
+`well known algorithm' by now.
+
--dry-run often does not work with fetch, even though this is a
logically plausible request. (It fails, instead.)