chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dgit: Introduce access_nomdistro()
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index bdd6841951609938a1eb7196b264295442b0fb0c..e6ab29caa60241ffffd499cad1eb530144350f0d 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-699,6
+699,11
@@
sub access_basedistro () {
}
}
}
}
+sub access_nomdistro () {
+ my $base = access_basedistro();
+ return cfg("dgit-distro.$base.nominal-distro",'RETURN-UNDEF') // $base;
+}
+
sub access_quirk () {
# returns (quirk name, distro to use instead or undef, quirk-specific info)
my $basedistro = access_basedistro();
sub access_quirk () {
# returns (quirk name, distro to use instead or undef, quirk-specific info)
my $basedistro = access_basedistro();
@@
-794,6
+799,8
@@
sub access_distros () {
unshift @l, $instead_distro;
@l = grep { defined } @l;
unshift @l, $instead_distro;
@l = grep { defined } @l;
+ push @l, access_nomdistro();
+
if (access_forpush()) {
@l = map { ("$_/push", $_) } @l;
}
if (access_forpush()) {
@l = map { ("$_/push", $_) } @l;
}
@@
-986,6
+993,11
@@
sub archive_query ($;@) {
{ no strict qw(refs); &{"${method}_${proto}"}($proto,$data,@_); }
}
{ no strict qw(refs); &{"${method}_${proto}"}($proto,$data,@_); }
}
+sub archive_query_prepend_mirror {
+ my $m = access_cfg('mirror');
+ return map { [ $_->[0], $m.$_->[1], @$_[2..$#$_] ] } @_;
+}
+
sub pool_dsc_subpath ($$) {
my ($vsn,$component) = @_; # $package is implict arg
my $prefix = substr($package, 0, $package =~ m/^l/ ? 4 : 1);
sub pool_dsc_subpath ($$) {
my ($vsn,$component) = @_; # $package is implict arg
my $prefix = substr($package, 0, $package =~ m/^l/ ? 4 : 1);
@@
-1092,7
+1104,7
@@
sub archive_query_ftpmasterapi {
if length $@;
}
@rows = sort { -version_compare($a->[0],$b->[0]) } @rows;
if length $@;
}
@rows = sort { -version_compare($a->[0],$b->[0]) } @rows;
- return @rows;
+ return
archive_query_prepend_mirror
@rows;
}
sub file_in_archive_ftpmasterapi {
}
sub file_in_archive_ftpmasterapi {
@@
-1134,7
+1146,8
@@
sub file_in_archive_dummycatapi ($$$) {
#---------- `madison' archive query method ----------
sub archive_query_madison {
#---------- `madison' archive query method ----------
sub archive_query_madison {
- return map { [ @$_[0..1] ] } madison_get_parse(@_);
+ return archive_query_prepend_mirror
+ map { [ @$_[0..1] ] } madison_get_parse(@_);
}
sub madison_get_parse {
}
sub madison_get_parse {
@@
-1240,7
+1253,7
@@
END
my ($vsn,$component,$filename,$sha256sum) = @$_;
[ $vsn, "/pool/$component/$filename",$digester,$sha256sum ];
} @rows;
my ($vsn,$component,$filename,$sha256sum) = @$_;
[ $vsn, "/pool/$component/$filename",$digester,$sha256sum ];
} @rows;
- return @rows;
+ return
archive_query_prepend_mirror
@rows;
}
sub canonicalise_suite_sshpsql ($$) {
}
sub canonicalise_suite_sshpsql ($$) {
@@
-1296,7
+1309,8
@@
sub archive_query_dummycat ($$) {
}
C->error and die "$dpath: $!";
close C;
}
C->error and die "$dpath: $!";
close C;
- return sort { -version_compare($a->[0],$b->[0]); } @rows;
+ return archive_query_prepend_mirror
+ sort { -version_compare($a->[0],$b->[0]); } @rows;
}
sub file_in_archive_dummycat () { return undef; }
}
sub file_in_archive_dummycat () { return undef; }
@@
-1358,8
+1372,8
@@
sub get_archive_dsc () {
canonicalise_suite();
my @vsns = archive_query('archive_query');
foreach my $vinfo (@vsns) {
canonicalise_suite();
my @vsns = archive_query('archive_query');
foreach my $vinfo (@vsns) {
- my ($vsn,$
subpath
,$digester,$digest) = @$vinfo;
- $dscurl =
access_cfg('mirror').$subpath
;
+ my ($vsn,$
vsn_dscurl
,$digester,$digest) = @$vinfo;
+ $dscurl =
$vsn_dscurl
;
$dscdata = url_get($dscurl);
if (!$dscdata) {
$skew_warning_vsn = $vsn if !defined $skew_warning_vsn;
$dscdata = url_get($dscurl);
if (!$dscdata) {
$skew_warning_vsn = $vsn if !defined $skew_warning_vsn;
@@
-1822,7
+1836,9
@@
sub check_for_vendor_patches () {
vendor_patches_distro(Dpkg::Vendor::get_current_vendor(),
"Dpkg::Vendor \`current vendor'");
vendor_patches_distro(access_basedistro(),
vendor_patches_distro(Dpkg::Vendor::get_current_vendor(),
"Dpkg::Vendor \`current vendor'");
vendor_patches_distro(access_basedistro(),
- "distro being accessed");
+ "(base) distro being accessed");
+ vendor_patches_distro(access_nomdistro(),
+ "(nominal) distro being accessed");
}
sub generate_commits_from_dsc () {
}
sub generate_commits_from_dsc () {
@@
-2264,9
+2280,9
@@
sub git_fetch_us () {
my @specs = deliberately_not_fast_forward ? qw(tags/*) :
map { "tags/$_" }
(quiltmode_splitbrain
my @specs = deliberately_not_fast_forward ? qw(tags/*) :
map { "tags/$_" }
(quiltmode_splitbrain
- ? (map { $_->('*',access_
base
distro) }
+ ? (map { $_->('*',access_
nom
distro) }
\&debiantag_new, \&debiantag_maintview)
\&debiantag_new, \&debiantag_maintview)
- : debiantags('*',access_
base
distro));
+ : debiantags('*',access_
nom
distro));
push @specs, server_branch($csuite);
push @specs, qw(heads/*) if deliberately_not_fast_forward;
push @specs, server_branch($csuite);
push @specs, qw(heads/*) if deliberately_not_fast_forward;
@@
-2401,7
+2417,7
@@
END
Dumper(\%lrfetchrefs_f);
my %here;
Dumper(\%lrfetchrefs_f);
my %here;
- my @tagpats = debiantags('*',access_
base
distro);
+ my @tagpats = debiantags('*',access_
nom
distro);
git_for_each_ref([map { "refs/tags/$_" } @tagpats], sub {
my ($objid,$objtype,$fullrefname,$reftail) = @_;
git_for_each_ref([map { "refs/tags/$_" } @tagpats], sub {
my ($objid,$objtype,$fullrefname,$reftail) = @_;
@@
-3139,9
+3155,9
@@
sub splitbrain_pseudomerge ($$$$) {
if (defined $overwrite_version) {
} elsif (!eval {
if (defined $overwrite_version) {
} elsif (!eval {
- my $t_dep14 = debiantag_maintview $i_arch_v->[0], access_
base
distro;
+ my $t_dep14 = debiantag_maintview $i_arch_v->[0], access_
nom
distro;
my $i_dep14 = infopair_lrf_tag_lookup($t_dep14, "maintainer view tag");
my $i_dep14 = infopair_lrf_tag_lookup($t_dep14, "maintainer view tag");
- my $t_dgit = debiantag_new $i_arch_v->[0], access_
base
distro;
+ my $t_dgit = debiantag_new $i_arch_v->[0], access_
nom
distro;
my $i_dgit = infopair_lrf_tag_lookup($t_dgit, "dgit view tag");
my $i_archive = [ $archive_hash, "current archive contents" ];
my $i_dgit = infopair_lrf_tag_lookup($t_dgit, "dgit view tag");
my $i_archive = [ $archive_hash, "current archive contents" ];
@@
-3205,7
+3221,7
@@
sub push_parse_changelog ($) {
fail "-p specified $package but changelog specified $clogpackage"
unless $package eq $clogpackage;
my $cversion = getfield $clogp, 'Version';
fail "-p specified $package but changelog specified $clogpackage"
unless $package eq $clogpackage;
my $cversion = getfield $clogp, 'Version';
- my $tag = debiantag($cversion, access_
base
distro);
+ my $tag = debiantag($cversion, access_
nom
distro);
runcmd @git, qw(check-ref-format), $tag;
my $dscfn = dscfn($cversion);
runcmd @git, qw(check-ref-format), $tag;
my $dscfn = dscfn($cversion);
@@
-3241,7
+3257,7
@@
sub push_tagwants ($$$$) {
};
}
foreach my $tw (@tagwants) {
};
}
foreach my $tw (@tagwants) {
- $tw->{Tag} = $tw->{TagFn}($cversion, access_
base
distro);
+ $tw->{Tag} = $tw->{TagFn}($cversion, access_
nom
distro);
$tw->{Tfn} = sub { $tfbase.$tw->{TfSuffix}.$_[0]; };
}
printdebug 'push_tagwants: ', Dumper(\@_, \@tagwants);
$tw->{Tfn} = sub { $tfbase.$tw->{TfSuffix}.$_[0]; };
}
printdebug 'push_tagwants: ', Dumper(\@_, \@tagwants);
@@
-3272,7
+3288,7
@@
sub push_mktags ($$ $$ $) {
# to control the "tagger" (b) we can do remote signing
my $authline = clogp_authline $clogp;
my $delibs = join(" ", "",@deliberatelies);
# to control the "tagger" (b) we can do remote signing
my $authline = clogp_authline $clogp;
my $delibs = join(" ", "",@deliberatelies);
- my $declaredistro = access_
base
distro();
+ my $declaredistro = access_
nom
distro();
my $mktag = sub {
my ($tw) = @_;
my $mktag = sub {
my ($tw) = @_;