@@ -1010,7 +1010,8 @@ sub preseed_create ($$;@) {
my $suite= $ho->{Suite};
my $d_i= $ho->{Tftp}{Path}.'/'.$ho->{Tftp}{DiBase}.'/'.$r{arch}.'/'.
- $c{TftpDiVersion}.'-'.$ho->{Suite};
+ ($ho->{DiVersion} // cfg_tftp_di_version($ho->{Suite}))
+ .'-'.$ho->{Suite};
preseed_hook_installscript($ho, $sfx,
'/lib/partman/init.d', '000override-parted-devices', <<END);
@@ -1384,7 +1385,7 @@ sub debian_guest_di_version ($) {
$gho->{DiVersion} //= guest_var($gho,'di_version',undef);
if (!$gho->{DiVersion}) {
- $gho->{DiVersion} = $c{TftpDiVersion};
+ $gho->{DiVersion} = cfg_tftp_di_version(debian_guest_suite($gho));
store_runvar("$gho->{Guest}_di_version", $gho->{DiVersion});
}
@@ -862,7 +862,8 @@ sub selecthost ($) {
};
if (defined $job) {
$ho->{Suite} = target_var($ho, "suite") // $c{DebianSuite};
- $ho->{DiVersion} = target_var($ho, "di_version") // $c{TftpDiVersion};
+ $ho->{DiVersion} = target_var($ho, "di_version")
+ // cfg_tftp_di_version($ho->{Suite});
}
#----- handle hosts which are themselves guests (nested) -----
Replace references to $c{TftpDiVersion} in the general osstest code with calls to cfg_tftp_di_version. This means that the suite-specific d-i version will, in general, be honoured (as is correct). In preseed_create, we also honour $ho->{DiVersion}. Often this won't be set, but it might be (for example, by selecthost finding di_version runvars). Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> --- Osstest/Debian.pm | 5 +++-- Osstest/TestSupport.pm | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-)