[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 6/6] Various: Honour suite-specific TftpDiVersion



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@xxxxxxxxxxxxx>
---
 Osstest/Debian.pm      |    5 +++--
 Osstest/TestSupport.pm |    3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index f3c2f63..1e4900b 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -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});
     }
 
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 0b3e18a..572d657 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -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) -----
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.