summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2013-08-16 19:13:11 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2013-08-16 19:13:11 +0100
commit8b9c62a712a865440b0c56c0d6d45c53d7df1c29 (patch)
tree311837f5ebf05182bb1419baf8df788223336901
parent03e6840182e85e5c0e5d9b831d942dd8d2df013b (diff)
support non-main
-rwxr-xr-xdgit17
-rw-r--r--dgit.114
2 files changed, 19 insertions, 12 deletions
diff --git a/dgit b/dgit
index 3bfdfc4..c353b8e 100755
--- a/dgit
+++ b/dgit
@@ -134,6 +134,7 @@ sub runcmd_ordryrun {
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://',
@@ -216,10 +217,10 @@ sub archive_query () {
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) {
@@ -227,9 +228,15 @@ sub archive_query () {
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);
}
diff --git a/dgit.1 b/dgit.1
index f949d07..a226350 100644
--- a/dgit.1
+++ b/dgit.1
@@ -166,19 +166,14 @@ on the dgit command line.
.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.
@@ -221,5 +216,10 @@ line numbers in dgit.
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.)