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

[Xen-devel] [OSSTEST PATCH 04/11] di_installer_path: Break out of preseed_create



No functional change.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Osstest/Debian.pm | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 6a1babf..7664194 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -34,7 +34,7 @@ BEGIN {
     $VERSION     = 1.00;
     @ISA         = qw(Exporter);
     @EXPORT      = qw(debian_boot_setup
-                      di_special_kernel
+                      di_installer_path di_special_kernel
                       setupboot_bootloader_edited_rune
                       debian_overlays
                       debian_guest_suite debian_guest_di_version
@@ -1044,6 +1044,16 @@ END
     return create_webfile($ho, "preseed$sfx", $preseed_file);
 }
 
+sub di_installer_path ($) {
+    # returns a path within $ho->{Tftp}{Path}, which is therefore
+    # useable for constructing host paths as well as guest paths
+    my ($ho) = @_;
+
+    return $ho->{Tftp}{DiBase}.'/'.$r{arch}.'/'.
+       ($ho->{DiVersion} // cfg_tftp_di_version($ho->{Suite}))
+       .'-'.$ho->{Suite};
+}
+
 sub di_special_kernel ($$$) {
     my ($ho, $d_i, $fn) = @_;
     # calls $fn->($kp, $kernel, $cpio) # $kernel and/or $cpio may be undef
@@ -1080,9 +1090,7 @@ sub preseed_create ($$;@) {
     my $disk= $xopts{DiskDevice} || '/dev/sda';
     my $suite= $ho->{Suite};
 
-    my $d_i= $ho->{Tftp}{Path}.'/'.$ho->{Tftp}{DiBase}.'/'.$r{arch}.'/'.
-       ($ho->{DiVersion} // cfg_tftp_di_version($ho->{Suite}))
-       .'-'.$ho->{Suite};
+    my $d_i = $ho->{Tftp}{Path}.'/'.di_installer_path($ho);
 
     preseed_hook_installscript($ho, $sfx,
           '/lib/partman/init.d', '000override-parted-devices', <<END);
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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