summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2013-10-25 17:00:14 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2013-10-25 17:00:14 +0100
commit5da0beaa99ee13adfd3378671ee0116975250c25 (patch)
tree40c414994595a2c4d072c18f92298943e15671d9
parent08b5daae7971c7ab730471d58d665ef087573791 (diff)
break out pool_dsc_subpath
-rwxr-xr-xdgit10
1 files changed, 7 insertions, 3 deletions
diff --git a/dgit b/dgit
index d74dd85..e5dbabb 100755
--- a/dgit
+++ b/dgit
@@ -585,6 +585,12 @@ sub archive_query ($) {
{ no strict qw(refs); &{"${method}_${proto}"}($proto,$data); }
}
+sub pool_dsc_subpath ($$) {
+ my ($vsn,$component) = @_; # $package is implict arg
+ my $prefix = substr($package, 0, $package =~ m/^l/ ? 4 : 1);
+ return "/pool/$component/$prefix/$package/".dscfn($vsn);
+}
+
sub archive_query_madison ($$) {
my ($proto,$data) = @_;
die unless $proto eq 'madison';
@@ -634,9 +640,7 @@ sub madison_parse ($) {
$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/$component/$prefix/$package/".dscfn($vsn);
- push @out, [$vsn,$subpath,$newsuite];
+ push @out, [$vsn,pool_dsc_subpath($vsn,$component),$newsuite];
}
return sort { -version_compare_string($a->[0],$b->[0]); } @out;
}